About detach

release

2.0.4

Release date: 2011-01-11 Download (3.4 MB) Binary:  objectdb-2.0.4.zip You should start by following a  tutorial or reading the manual ...

 
issue

Read only hint for query

Second thing after @FetchGroup I've found is read-only hint for EM. You can specify this hint to EM when executing query meaning that returned data will never be edited or persisted. My understanding of this is that each entity returned from query is in detached state as default state. query.setHint("odb.read-only", "true"); This could be useful in situation when you are sure, that you won't modify those entities - like listing entities, paging, logging, reporting. Feature Request Version: Priority: Normal Status: Active Replies: 0 Type:  Feature Request ...

 
manual

Deleting JPA Entity Objects

Explains how to use JPA to delete (remove) entity objects from the database. Existing entity objects can be deleted from the database either explicitly by invoking the remove remove(entity) EntityManager's method Remove the entity instance. See JavaDoc Reference Page... method or implicitly ...

 
forum_thread

How do I achieve a Deep Fetch using JOIN FETCH?

I have an Entity type which is contains a collection of Embeddable objects, which in turn themselves contain a collection of Embeddable objects: @Embeddable class A { String val; }; @Embeddable class B { List<A> aList; }; @Entity class C { @Id long id; List<B> bList; };   Usually I'm content to have the B's and A's be lazily loaded, but I have a circumstance where I need to be able to work with the whole C object, with all its parts, as a detached object. #1 2013-03-27 03:07 I have an Entity type which is contains a collection of Embeddable objects, which in turn themselves contain a co ...

 
api-jdo

getDetachmentOptions()

Get options used during detachment.(Method of javax.jdo.FetchPlan)

 
api-jdo

setDetachmentRoots(roots)

Set the roots for DetachAllOnCommit.(Method of javax.jdo.FetchPlan)

 
api-jpa

lock(entity, lockMode)

Lock an entity instance that is contained in the persistence context with the specified lock mode type.(Method of javax.persistence.EntityManager)

 
api-jdo

makePersistentAll(pcs)

Make a Collection of instances persistent.(Method of javax.jdo.PersistenceManager)

 
forum_thread

Significant I/O costs during batch update or insert data.

Our application has some complex entities. We do batch update(merge detached entity) every 2 minutes. We find the period significant IO costs these days, and disappeared when turn off the batch updating. 1.ObjectDB is in embedded mode. 2.ObjectDB version is 2.3.7 3.Database file size is nearly 600mb and increasing. #1 2012-04-08 02:32 Our application has some complex entities. We do batch update(merge detached entity) every 2 minutes. We find the ...

 
issue

Unexpected exception (Error 990) - Merge with no Transaction

I am frequently having an error when merging a detached object outside of a transaction. (Is this allowed? I am not trying to modify the object, just read data from it.) Here is a test case: Bug Version: Priority: Normal Status: Fixed Replies: 1 Type:  Bug ...