About detached

manual

Detached Entity Objects

Explains detached entity objects and how to work with detached objects in JPA, including merging them into an EntityManager. Detached entity objects are objects in a special state in which they are ... in the database. Compared to managed entity objects, detached objects are limited in functionality: Many JPA methods do not accept detached objects (e.g. lock lock(entity, lockMode) ...

 
forum_thread

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: #1 2011-01-05 08:13 I have an entity that looks like this: class User { @ embedded private Profile ...

 
manual

Working with JPA Entity Objects

Explains the entity object lifecycle and the persistence context.... objects consists of four states: New, Managed, Removed and Detached. When an entity object is initially created its ... Deleting Entities section. The last state, Detached , represents entity objects that have been disconnected from the ...

 
issue

Navigation through lazy loading from Detached Objects

A main limitation of detached objects (as explained on the Detached Entities manual page) is: ... A main limitation of detached objects (as explained on the Detached Entities manual page) is: Retrieval by navigation ...

 
forum_thread

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)  ... classes again to use this). So you can use now detached entity objects . Maybe you may even use detached entity objects directly in GWT with no DTO.   ...

 
manual

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

 
api-jpa

detach(entity)

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

 
api-jpa

CascadeType.DETACH

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

 
forum_thread

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. ... (and so lazy loading would initially work), they become detached once the EntityManager under control of the container, and then in ... of lazy loaded relationships outside a transaction, once detached, any you won't have needed any of the above required under ...

 
forum_thread

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(); ... Some objects cannot be detached. They throw this exception: Please report this error on ...