About detach


Detached Entity Objects

Explains detached entity objects and how to work with detached objects in JPA, including merging them into an EntityManager.... covers the following topics: Explicit Detach Cascading Detach Bulk Detach Explicit Merge ...


NPE after an @embedded obj is updated for a detached entity

I have an entity that looks like this: class User { @embedded private Profile profile; ...}   After running something like this: User user = entityManager.createQuery("select......entityManager.detach(user);user.getProfile().setDescription("Something...   I get the following error:... createQuery ( "select...... entityManager.detach(user); user.getProfile().setDescription(" Something... I ...


Working with JPA Entity Objects

Explains the entity object lifecycle and the persistence context. Entity objects are in-memory instances of entity classes (persistable user defined classes), which can represent physical objects in the database. Managing an ObjectDB Object Database using JPA requires using entity objects for many oper ...


Navigation through lazy loading from Detached Objects

A main limitation of detached objects (as explained on the Detached Entities manual page) is: ... A new system property ( "objectdb.temp.no-detach" ) can be set to disable detachment of objects. Basically that is what ...   // System.setProperty("objectdb.temp.no-detach", "true");   EntityManagerFactory emf = ...


GWT RPC is throwing serialization exception when I have object db date value

Caused by: com.google.gwt.user.client.rpc.SerializationException: Type 'objectdb.java.util.Date' was not included in the set of types which can be serialized by this SerializationPolicy or its Class object could not be loaded. For security purposes, this type will not be serialized.: instance = Sat Jan 29 00:00:00 PST 2011    at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:614)   #1 2011-02-07 15:14 Caused by: com.google.gwt.user.client.rpc.SerializationException: Type 'objectdb.java.util.Date' was not included i ...


Advanced JPA Topics

Describes advanced JPA topics - detached entity objects, lock management and entity lifecycle events. This section discusses advanced JPA topics: Detached Entity Objects Locking in JPA JPA Lifecycle Events Shared (L2) Entity Cache JPA Metamodel API ...



Remove the given entity from the persistence context, causing a managed entity to become detached.(Method of javax.persistence.EntityManager)



Cascade detach operation(Enum Constant of javax.persistence.CascadeType)


Object DB vs EclipseLink/TopLink: Unloaded relationships in detached entities

This topic is for those considering migrating from EclipseLink JPA or TopLink to ObjectDB JPA. ... 3. Use a FETCH JOIN as described here: Detach JPA objects with lazy initialized properties This has the big ...


A lot of ENT and SIV instances which are not cleared by GC

Hello. I have a JSF application (Glassfish 4, Java 8, ObjectDB 2.6.0). In some time the heap is getting 95% full with java.lang.OutOfMemoryError: GC overhead limit exceeded.  The first screenshot from VisualVM shows used heap during a 1000 requests stress test. The second shows that after this test there are many com.objectdb.o.ENT and com.objectdb.o.SIV instances. Why isn't it cleaned? I use simple EJB managers containing EntityManagers. On bean's PreDestroy and in servlet's i make entityManager.clear(); ... enhanced classes? Are you using  "objectdb.temp.no-detach" ? Try to find the roots and paths to the ENT objects (using ... Yes, I use no-detach option. So how can I fix it? Remove no-detach? But it has negative ...