About find

release

2.5.5

... Added support of using entity instead of a PK in find (retrieval by example). Added support of using list of ... . Fixed a bug in optimistic locking on find by using LockModeType.WRITE . Fixed exception when a ...

 
issue

New entity objects are duplicated on merge cascading

When merge is cascaded to a new entity object that has not been persisted yet - it becomes persisted twice. This was demonstrated by a Java EE application in this forum thread but may be reproduced also in a simple console test case: ... ( ) ; Book book = em. find ( Book. class , 1 ) ; em. close ( ... ( ) ;   A a = em. find ( A. class , 1L ) ; B b = new B ( ...

 
forum_thread

openejb jpa jaas module

    hello , i've finished jpa jaas module. Here it is :   package com.bayner.auth; import com.bayner.jpa.Principals; import com.bayner.jpa.UserInfo; import com.bayner.jpa.UserPrincipal; ... {   info = entityManager. find ( UserInfo. class , username ) ; ... final Principals principals1 = entityManager. find ( Principals. class , principalId ) ; ...

 
forum_thread

Start ObjectDB inside java code.

I am building an MMORPG with ObjectDB, and I use it both for the saving of character and inventory (permanent object), but also the storing of ability and maps information (object I load, use, and dispose and then reuse without having change anything). The problems is, as my server and client both run on the same machine and more than one client can be started, they all need access to this information without being able to share any thread, so am forced to use the server model. ... to use the server model. Yet, I can't seem to find a way to automatically start the server mode, and i can't really ... and am sorry if not, but I don't seem to be able to find the require information.   ...

 
forum_thread

@OneToMany(fetch = FetchType.LAZY) list is always null

Hello. @OneToMany(fetch = FetchType.LAZY) doesn't work when using EJB or something else related to J2EE. parent.getChildren() returns null. Here is a simple example: Bean: ...   id = parent. getId ; parent = find ( id ) ; parent. getByteData ( ) . ... the getter of data of byteData   parent = find ( id ) ; merge ( parent ) ; // ...

 
issue

again merger missing logs + objectdb exception

we are facing similar problems as we had before, in the log we have a lot of entries merger ... missing + an objectdb exception. Some objects in the system behave strange. This is a part of the log: ... [2017-09-26 12:16:14 #1222 store] SectionClassifier: SectionClassifier{238146996->merger[3309]-missing:1} [2017-09-26 12:16:25 #1223 store] SectionClassifier: SectionClassifier{238146996->merger[3309]-missing:1} ... Please consider enabling recording . If we cannot find the cause now by analyzing the database this could enable reproducing the ... 07:55 We will try to find that query edit ...

 
release

2.4.0

... . Fixed a bug in optimistic locking on find by using LockModeType.WRITE . Fixed exception when a ... id type when an entity object is retrieved using  find  with a PK of a different type (e.g. Integer instead of Long ...

 
forum_thread

Database(*.odb) file size on disk

Hello, we have questions about the file size of ObjectDB database on disk. Can you tell us something about how the deleting of entities affects the size of *.odb files on disk? -Will the released memory always used by new entities? -Will be the database file automatically reduced?   We have created a small test, in which we create and delete entities. It looks like that the released memory are reused but the the file not resized. The database is at the end empty again, but larger than the initial size. ... + entityB. id ; EntityA entity = em. find ( EntityA. class , entityAIds. get ( i ) ) ... ( ) ; EntityA entity = em. find ( EntityA. class , entityAIds. get ( i ) ) ...

 
issue

Remove of an entry from a @OneToMany collection is not possible if the enhancer is disabled

Hello! When the JPA entities are not enhanced the remove of an entry from a @OneToMany collection is not possible. The following java code demonstrates the problem. The statement parentEntity.getChildEntityContainer().remove("01"); does not work with not enhanced JPA entities. ... ) ;   parentEntity = entityManager. find ( ParentEntity. class , 1l ) ; Assert. assertEquals ... clear ( ) ;   e = em. find ( MyEntity. class , 1l ) ; Assert. ...

 
forum_thread

Getting java.lang.ArithmeticException: / by zero

HI, I am using ObjectDb 1.x and getting the following exception while calling the following code PersistenceManager pm = getPersistenceManager(); ... 14:09 Please find the attached object db jar. odbee.jar ... 20:18 I couldn't find the build number. It may be a very old jar. Please try the ...