About detached

forum_thread

Possible issue with LAZY Loading

Hi, We need lazy loading for one of our large data sets. When I run currently against both 2.4.2 and 2.4.3_01 the db is always returning everything, including the data marked as Fetch.LAZY.  I wrote the attached unit test, and then found this: http://www.objectdb.com/database/forum/9 As far as I can tell, my unit test is pretty much identical. Not sure why this doesn't work. Thanks Paul. ... when the EntityManager is closed or results are detached. In this case, LAZY data will not be available and will not be fetched ...

 
forum_thread

Java 8 Enhancer Problem

Hello! I am currently migrating my project to Java 8. I'm using Spring and AspectJ load time weaving. Unluckily the LTW option of Spring is global. If it's enabled it also tries to find other class transformers on the classpath. This is normaly not a problem because the ObjectDB enhancer ignores non @Entity or already enhanced classes but in conjunction with new Java 8 class files it throws an exception which causes Spring to stop weaving.  #1 2014-04-28 09:53 Hello! I am currently migrating my project to Java 8. I'm using Spring and AspectJ load time weaving. ...

 
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: ... the  EntityManager  your entity objects are detached and lazy relationships cannot be used, if not already loaded before ...

 
forum_thread

OptimisticLockException

Have read read the documentation on optimistic locks, still not sure how to deal with these exceptions: [ObjectDB 2.2.5_04] javax.persistence.RollbackException Failed to commit transaction: Optimistic lock failed for object   ... additional settings in which objects are automatically detached at the end transaction. Yes, if A holds an older ...

 
forum_thread

ClassCastException on closing PersistenceManager

Hi, I am using ObjectDB 2.6.3.b03 via JDO. Today I got the following exception while closing the PersistenceManager after reading the DB: #1 2015-10-14 13:53 Hi, I am using ObjectDB 2.6.3.b03 via JDO. Today I got the following exception while closing the Per ...

 
forum_thread

Removing entity class

Hello, I am using evaluation version of ObjectDB for long term private project. Recently I hit the 10 entities limit and got exception: com.objectdb.o.UserException: Too many persistable types (>10) - exceeds evaluation limit Among the 10 entities in the project there are 2 entities I added long time ago and they were never really used. I deleted them from Java source code, but there are still in ObjectDB database. The 2 tables for these entities are empty, but the tables exist, so they count into 10 entities limit. #1 2014-06-02 19:50 Hello, I am using evaluation version of ObjectDB for long term private project. Recently I hit the 10 ent ...

 
forum_thread

evictAll() behavior

I'm writing a multi-user drawing tool, using objectdb as the central store.  When a user press F5, I want to pick up all the changes from the database.  So, I call evictAll() in the following ways: pmf.getDataStoreCache().evictAll();  // the factory pm.evictAll();                                 // the persistence manager A couple of questions about this: 1. the first evictAll() seems to be clearing the L2 cache -- is this correct 2. the evicts only work when they are done inside a transaction -- is this specified in the JDO spec? #1 2010-12-08 23:57 I'm writing a multi-user drawing tool, using objectdb as the central store.  When a user press F5, I want to ...

 
forum_thread

Attempt to refresh a non managed entity object (error 635)

Just ran into a problem that I've not seen in 10 years of running ObjectDb: java.lang.IllegalArgumentException Attempt to refresh a non managed entity object (error 635) Nothing changed in my code, but I'm wondering if there is a problem with the config file, and /or my recent experiments with Intellij's JPA database explorer, which required me to use a JPA persistence.xml configuration file. (I was able to use to run objectdb queries from inside Intellij). ... a new entity object that has not been persisted yet, or a detached entity object (e.g. after clear ). It doesn't seem to ...

 
forum_thread

Dirty checking

Hi, wondering if anyone knows the best way to detect which objects have been changed in the database. ie: which objects, and which collections of objects, have been dirtied.     ... that post commit entities are automatically set to 'Detached' state.  However, unless the relevant parts of the ... been retrieved, they won't be retrieved for the detached object. I'm not sure how ObjectDb handles that, am guessing that ...

 
api-jdo

getDetachmentRootClasses()

Get the root classes for DetachAllOnCommit.(Method of javax.jdo.FetchPlan)