ObjectDB Database Search

51-100 of 200 results

General Performance Issues Illustrated with a Specific Method

listPatientsByIDsWithBasicData(String ids) { Long st = new Date().getTime(); System.out.println ... ); System.out.println("cs size = " + cs.size()); Long ed = new Date().getTime(); System.out.println ... = GenerationType.AUTO) private Long id; private static final long serialVersionUID = 1L; @Index @OneToOne

Inserted entities with strings as keys and indices needs more and more ram memory in comparing to primitive integers as keys and indices

programs demonstrate well that automatic  long primary keys are indeed much more efficient ... be filled to the maximum with new objects. Long values consume less  space than String UID and are processed faster. support Support Thank you for the clarification. The example with long keys needs

Optimistic locking: prevent version increment on entity collection attribute

;  @Id private long id;        @OneToMany(mappedBy="document")     private ArrayList readings = new ArrayList ();        public long ... ;   @Id private long id;     private Document document = null;   

ClassCastException on SELECT NEW ... after UPDATE over Java RMI

is (simple bean): public class FileNameDTO { private Long id; private String fileName; public FileNameDTO( Long id, String fileName) { this.id = id; this.fileName = fileName; } public Long getId() { return id; } public void setId( Long id) { this.id = id; } public String getFileName() { return fileName

Need help to make this test work and define proper annotations for entities Lists

;          @Id @GeneratedValue private long id;   ... ;          public long getId() {     ... ;    public void setId( long id) {          

Composite Index error 328

class UsrlistEntity implements Serializable { private static final long serialVersionUID = -4472890635861972890L; private int id; private int dyId; private long pwd; private String usrName; private ... surname; private String job; private String phoneNumber; private Long contactHash; private String

Date field Index is corrupted due to time change

;   em.getTransaction().begin();         Long r = ( Long ... ; em.getTransaction().begin();         r = ( Long ) q ... roundDownDateTime(Date dateTime) {         long dateTimeMs = dateTime.getTime

Error 363 - Failed to read value of inverse relationship

.AUTO) private long id; @ManyToOne(optional=false) private ETown town; public ETown getTown ... implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue private Long ... public class Message implements Serializable { private static final long serialVersionUID = 1L; @Id

Is it possible to remove parent/child entities without refresh?

{ @Entity public static class ParentEntity {   @Id   @GeneratedValue   private long id ... (), child);   }   public long getId() {    return id;   }   public void setId( long id) {    this.id = id;   } } @Entity public static class ChildEntity {  

Wrong data stored in time only fields

;   Long r = ( Long ) q.getSingleResult();           ... ) {         long dateTimeMs = dateTime.getTime();         long reminderMs  = dateTimeMs % 1000;      

TemporalType injection with Calendar using JPA

Calendar may be supported in the future - but as long as it is not portable JPA - it should be avoided ... have replaced the Calendar fields with " long " data types which represent the millisecond value of the Date ... TimePeriod implements Serializable { private long beginTime; private long endTime; private String

Multi part paths in a composite index must have the same length

; private static final long serialVersionUID = 998L;     @Id @GeneratedValue long id;     @Index private Long instrumentId;     private SafeLong tStamp; The SafeLong class is a very simple wrapper of a long -  @Embeddable public class SafeLong

IDs of Entities suddenly became UUIDs?

do have a UUID String as their id instead of Long which is of course causing a lot of troubles. Note that this even occurrs on the same "Table" -- some saved Entitities of same type do still have a Long ID, others a String UUID. Our Base-Entity everything inherits from is declared as usual with Long

EmbeddedId with Generated field value

********* @Entity @IdClass(CompositePK.class) public class A {     @Id private long uid ... ;private long uid;     private String zone; } ********* Solution 2 ... {     private long uid;     private String zone; } In

Failing to read entities under load in multithreaded tests

TestIdHolder implements Serializable{     private static final long serialVersionUID = 1L;     private long version;     private long longId;   ... ="TestIdTableGen")     public long getLongId() {      

Database Inconsistency or corruption

", valueColumnName = "idValue", pkColumnValue = "objectValueId", allocationSize = 1)   protected Long id;   private String type;   private Long revision;   protected boolean ... ; String type,       Long revision,       Project project

Should derived fields of an EmbeddedId be manually maintained by app code?

+ numberToGen; int startCnt = lastInstanceInMap; long timing = System.currentTimeMillis(); while (endCnt ... "); q.setParameter("container", this); q.setFlushMode(FlushModeType.AUTO); try { long l = ( Long ) q ... implements Serializable { private static final long serialVersionUID = 0L; private String cachedKey; private

Unable to persist fields in subclass

) public abstract class SimpleAbstractPersonTest { private long addressID; private long contactID ... lastNameProperty() { return lastName; } public final long getAddressID() { return addressID; } public final void setAddressID( long id) { if (id 0) addressID = id; } public final long getContactID

Join query problem with new statetment

Serializable {     private static final long serialVersionUID = 1L;     private long inspID;     private String inspName;     private long productID;     private String productName;     

Visibility of changes in Transaction is not visible to a JPA QL Query

to see that they have been added long newTotal = -1;   try {    InitialContext ... ; .lookup("SLSBObjDb");    long oldAmount = bean.countItems();    bean.addItems ... ;  lastInstance = startCnt;   } } public long howManyItemsExist(EntityManager em) {  

Merge with Parent/Child entities not possible

{   @Id   @GeneratedValue   private long id;   @OneToMany(fetch = FetchType.LAZY ... (this);    children.put(child.getChildName(), child);   }   public long getId() {    return id;   }   public void setId( long id) {    this.id = id

failure to enforce NOT NULL for java.lang.String

.IDENTITY) private Long id; @Unique @Persistent(nullValue=NullValue.EXCEPTION) private String username; public Long getId() { return id; } public void setId( Long id) { this.id = id; } public String ... Long id;         @Unique       

Query on Embedded Primary Key?

;     public OBJ2() {     }     public OBJ2( long field1, long field2) {         primkey = new Primkey2(field1, field2 ... Primkey2 implements Serializable {     public long field1;     public long

Criteria query error: Unexpected query token

BaseEntity{ /** * */ private static final long serialVersionUID = 613965399994067819L; public ... long serialVersionUID = -7979088681300801112L; /** * Primary key for entity */ @Id // @GeneratedValue ... ) @GeneratedValue private Long id; /** * Version of object, supporting optimistic lock */ @Column (name = "opt

Object as parameter results in exception

; .     @Id    private Long id; } and the query:    @Override public T fetch(Company company, Long primaryKey) {   mLogger.info("Fetching type: {} with id ... ;@Override public T fetch(Company company, Long primaryKey) {   mLogger.info("Fetching type

JPQL keyword in entity - what to do?

;  public Long all;     public ResultData(String prodType, Long all) {   ... It seems that the constructor is not found - try changing the 2nd argument from Long to long . support ... was modified like this: public class ResultData { public String name; public long all; public boolean

Version 2.2.7 build 7/8 issue

Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue private Long id ... Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue private Long id ... customer; } public void setCustomer(Customer customer) { this.customer = customer; } public Long getId

Duplicate Entity class names causes Exception in Query

(NoResultException e) { return null; } } public long howManyItemsExist(EntityManager em) { TypedQuery q = em.createNamedQuery("objdbTest.Singleton.count", Long .class); q.setFlushMode(FlushModeType.AUTO); try { return ... static final long serialVersionUID = 2215109025397291357L; } If I change the query to  @NamedQuery

Problem with distinct select, order by and equivalent alias/attribute path

    @GeneratedValue(strategy = GenerationType.AUTO)     private Long id ... ;   }     public Street( Long id, String name, Location location) {   ... ; }     public Long getId() {         return id;  

Performance in SELECT statement

Long key;     private Long clientKey;     private String ... ;   private long timestamp;     @Embedded      ... State {     private Long lastProcessingDate;     private int

Bulk Delete and Update - best practice?

.createQuery("SELECT COUNT(d) from CacheData d", Long .class); long rows = q.getSingleResult ... .createEntityManager(); q = em.createQuery("SELECT COUNT(d) from CacheData d", Long .class); rows = q.getSingleResult ... public static class CacheData { @GeneratedValue @Id long id; @Index int hash; String data; public long

Inconsistent return types from JDO query

produced by the Query is inconsistent - sometimes Integer, sometimes Long .  Using setResultClass( Long .class) has no effect. sjzlondon Steve Zara The type of a sum expression depends on the type of the field on which it works, but should be long for both int and long fields. Please post

ID format in objectdb 2.x for JDOHelper.getObjectId

Bhaskar In ObjectDB 1.x object IDs where always unique long numbers, so these numbers could represent ... : private @Id @GeneratedValue long id; // JPA code and then the ID will be injected automatically ... @Id @GeneratedValue long id; but i think it only works in case of JPA not with JDO. Do you the any

More Efficient Primary Keys

Primary Key  with two Longs b) Embedded Primary Key with two Longs c) Furthermore, as String ... , how much performance improvement would bring a switch to a single long ? btc_es BTC EmbeddedSystems Unfortunately ... , and a single long is more efficient (and better if allocated sequentially rather than randomly). It is unclear

Feature Request for database.obj$ file

there is a background thread, merging the database.obj and the database.obj§ files. As long as this daemon ... it might be because a user holds a snapshot of the database for a long time (i.e. an EntityManager after flush that is not closed). It is a good practice to use a long -lived EntityManagerFactory

List of Enum Values in an entity

implements Serializable { private static final long   serialVersionUID = 1L; @Id @GeneratedValue Long        id; private String     name; private ... .createEntityManager();         Long id = entity.id;   

Does ObjectDB support lazy loading?

.persist(a); em.getTransaction().commit(); Long id = a.id; em.close(); em = emf.createEntityManager ... A { @Id @GeneratedValue Long id; @OneToMany(fetch=FetchType.LAZY, cascade=CascadeType.ALL) List list; } @Entity static class B { @Id @GeneratedValue public Long id; int value; B(int value

Beginners questions

implements Serializable { private static final long serialVersionUID = 1L; @Id @Column(name = "ID") @GeneratedValue(strategy = GenerationType.AUTO) private Long id; @OneToMany (fetch=FetchType.LAZY,cascade ... ") public class EBUser extends Pojo implements Serializable{ private static final long serialVersionUID = 1L

Getting the database file size

.createEntityManager()) { long fileSize = em.createQuery( "objectdb file-size", Long .class).getSingleResult(); System.out.printf("File Size: %d%n", fileSize); long objectCount = em.createQuery( "objectdb object-count", Long .class).getSingleResult(); System.out.printf("Object Count: %d%n", objectCount); } } support Support

Error 613 - i cant put a list into a Squad object

static final long serialVersionUID = 1L;     @Id     @GeneratedValue     private long id;     private int squadId;     private int athletId;     public long getId() {   

500Mb ObjectDb database opening issue

) for following code long time = System.currentTimeMillis(); m_EntityMgrFactory = Persistence ... to speed-up open time for big databases? Definitely, it's too long for 500 Mb database! We gonna ... which show problem with long data base open operation issue. Could you check from ObjectDb

InterfaceRef jakarta.persistence.criteria.ParameterExpression

to Integer, Long , Float, and Double. Support for typecasts between other basic types is not

CriteriaBuilder.sumAsLong(x) - JPA Method

JPA Method in jakarta.persistence.criteria.CriteriaBuilder Expression sumAsLong (    Expression  x ) Create an aggregate expression applying the sum operation to an Integer-valued expression, returning a Long result. Parameters: x - expression representing input value to sum operation Return: sum expression Since: JPA 2.0

InterfaceRef jakarta.persistence.criteria.Subquery

to Integer, Long , Float, and Double. Support for typecasts between other basic types is not required

After using the enhancer, Lazy loaded collections are no longer loading. They are set as null

(strategy= GenerationType.TABLE) protected Long id; @Override public Long getId() { return id; } @Override public void setId( Long id) { this.id = id; } @OneToMany(cascade={CascadeType.MERGE ... { @Id @Column(name = "project_id") @GeneratedValue(strategy= GenerationType.TABLE) protected Long id

[ObjectDB 2.2.5_02] Unexpected exception (Error 990) com.objectdb.o.InternalException: java.lang.NullPointerException: null

TimePeriod implements Serializable { private long beginTime; private long endTime; private String periodType; public long getBeginTime() { return beginTime; } public void setBeginTime( long beginTime) { this.beginTime = beginTime; } public long getEndTime() { return endTime; } public void setEndTime( long

InternalException when using MEMBER OF on a large list in a query

that combine large objects with long primary keys. In such objects the keys may not be embedded in ... the exception - storing large objects with long primary keys is not very efficient, because non embeddable ... they seem to be 36 bytes). support Support Thanks for the fix. Also thanks for the hint with long keys

When using inheritance, you can specify, which ID to use

     long id;     String field1; }   public EntityB() extends EntityA() {     @Id      long id;      ... EntityA() { String field1;     public abstract long getID();    

New entity objects are duplicated on merge cascading

;      private Long id;           ... )         private Long id;     }     ... A {         @Id @GeneratedValue long id;     

Tracking changes to new collections (in enhancement mode) after flush

;       em.flush();          long id = entity.id ... ;  public static class ListInMap {         private @Id long id ... (entity);         em.flush();          long