About find

forum_thread

On initialisation of lists: impact on migration from EclipseLink to ObjectDB

I would like to draw the attention of those assessing migration from EclipseLink ORM to ObjectDB to a significant difference in the initialization of persistent lists, namely that EclipseLink injects a List implementation into the List field to be initialise it during EntityManager.persist(). So in EclipseLink the following works: public class HasListOfBlocks { .. ... This has impact on migration; in my case I would have to find an explicitly init about 1000 lists, because I have a large number of hand-coded (harder to find) and generated (easy to regenerate) Lists in entities. There are ...

 
forum_thread

Import data from MySQL

Hi, I tried the objectdb in my research, find it very easy to handle without setting up xml files. However, I cannot find the import/export functions between other database, then how can I transfer mysql data into objectdb? When I use explorer.exe to browse the database in objectdb, eclipse tells me another app occupy it, then how can objectdb support multi-thread? ... Hi, I tried the objectdb in my research, find it very easy to handle without setting up xml files. However, I cannot find the import/export functions between other database, then how can I ...

 
forum_thread

Unexpected NoSuchFieldError exception

Hi, suddenly running into a number of issues:   1) no-arg constructor (error 352) 2) java.lang.NoSuchFieldError: __odbTracker 3) Attempt to start a transaction while another transaction is running. In each case, I've found it difficult to figure out where to find the right documentation. Below is an example that has #1 and #2 together. ... case, I've found it difficult to figure out where to find the right documentation. Below is an example that has #1 and #2 together. Additionally it's not clear how I find out whether configuration settings have been found (e.g. is it possible to ...

 
issue

Schema-Update: Rename superclass and remove one subclass

Hello, we renamed a superclass and removed one of the subclass. If we then try to open the Database (with ObjectDB-Explorer) we get a "Failed to generate dynamic type ..."   Small Example: Generate Database ... // do something ChildClassA entityWithID1 = em. find ( ChildClassA. class , 1 ) ; entityWithID1. ... = "a" ; ChildClassA entityWithID2 = em. find ( ChildClassA. class , 2 ) ; entityWithID2. ...

 
forum_thread

Schema-Update: Rename superclass and remove one subclass

Hello, we renamed a superclass and removed one of the subclass. If we then try to open the Database (with ObjectDB-Explorer) we get a "Failed to generate dynamic type ..."   Small Example: Generate Database ... // do something ChildClassA entityWithID1 = em. find ( ChildClassA. class , 1 ) ; entityWithID1. ... = "a" ; ChildClassA entityWithID2 = em. find ( ChildClassA. class , 2 ) ; entityWithID2. ...

 
forum_thread

How to creat a Query with Sql which returns a List<Mark> marks

How can i get out of the db my Athlete Objekt his list<Mark> marks collection with a createQuery Sql-Statement. the Mark and Athlete Object do not really have a primary or secondary key together, the list mark is just stored in the athletes object, not as an embeddable but as an entity. ... as an embeddable but as an entity. i tried with find(Mark.class, oldMark.getId()); but somehow the oldMark has no generated ID ... dbMark = dbConnection. getEm ( ) . find ( Mark. class , results. get ( 0 ) . ...

 
forum_thread

Items in list are doubled, when the entity class is not enhanced

Dear all, I have a problem with adding items (entities) into other entity list. When the classes are not enhanced, added items are doubled. Here is an example: ... ( ) ;   em. find ( Customer. class , Customer. class ) ; em. find ( Item. class , Item. class ) ;   // ...

 
forum_thread

Cannot catch a PersistenceException and continue the transaction

I try to create a factory that creates new objects just in case it doesn't find the relevant one in the DB. but because query.getSingleResult() fires NoResultException in that case it marks the transaction as one that need to be rolled back. I understood that I can overcome it in several ways but those don't work for me. 1. Begin a new (nested) transaction in another method that will be rolled back instead of the first one- doesn't work. I got a message that it couldn't begin a new transaction when another is active. ... that creates new objects just in case it doesn't find the relevant one in the DB. but because query.getSingleResult() ... - doesn't work for me because i need to find also objects created in the same transaction. Implement a ...

 
issue

Unexpected error when loading all entity instance

Hi, when going through all entity instance to find orphaned entries we get the exception: ... Hi, when going through all entity instance to find orphaned entries we get the exception: Exception in thread "main" ... Hello, I did not find a way to reproduce the error now. It seems there was insufficient memory ...

 
release

2.5.3

... 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 ...