About detached

forum_thread

Possible issue with String fields

Hi I'm brand new to objectdb and I'm trying to create an objectdb from a sample db via jdbc. The code all works and for a few thousand records but when I increase the number of records I get the following " ... context, causing all managed entities to become detached. See JavaDoc Reference Page... the EntityManager at ...

 
forum_thread

Problem with @Basic(fetch = FetchType.LAZY)

I have a class where two fields are annotated with @Basic(fetch = FetchType.LAZY) due to them containing quite long Strings and me loading ALL entities of the database on application startup (swing app) This class should hopefully demonstrate the problem: #1 2012-02-01 14:38 I have a class where two fields are annotated with  @Basic(fetch = FetchType.LAZY) due to them containing ...

 
api-jdo

setDetachmentOptions(options)

Set options to be used during detachment.(Method of javax.jdo.FetchPlan)

 
api-jpa

lock(entity, lockMode, properties)

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

 
forum_thread

ObjectDB 2.6.9_06 (embedded): Cascading merge resulting in duplicate objects

This issue maybe related to issue #110 (http://www.objectdb.com/database/issue/110). Because that issue has been closed as "fixed", I am reporting this new issue. This is my class definition: ... entity in the database. In explorer I can see that the "detached" entity is created first (ID #... is 2 less than that of the entity ...

 
api-jdo

javax.jdo.PersistenceManagerFactory

The PersistenceManagerFactory is the interface to use to obtain PersistenceManager instances.(Interface of JDO)

 
forum_thread

UserException - Object User#2 belongs to another EntityManager

Hi! Scenario's steps: 1. User goes to his profile, a JSF page. 2. @RequestScoped CDI bean UserDataB loads the current user of the session at each request, by using @Stateless bean UserC#findUserById(Long id) 3. JSF page's @RequestScoped CDI bean AnotherB loads trades of that user, by using @Stateless bean TradesC#findTradeByClient(User u). ### UserC and TradesC have their own @PersistenceContext EntityManager with the same unitName. ... EntityManager is closed all its objects should be detached automatically (unless specified otherwise ), so probably that ...

 
forum_thread

Pre-detach loading: retrieval by navigation not working in if statement

objectdb-2.6.3_04 JDK1.7 VM option at runtime: -javaagent:lib/objectdb.jar Experimental mode: objectdb.temp.no-detach NOT USED ... which should then be consistently re-computated once detached and used in a JSF web interface (not further shown here). I ... is taking place, because using reflection on loaded, detached entity objects I can see the hidden odb methods. But if I ...

 
forum_thread

Entity listener - event instead of object

Hi, Currently I'm playing with entity listener to implement auditing with difference between values in updated entity. There is a problem however with accessing "old" version of object stored in database. I can't find the nice way to use EntityManager in EntityListener. Because of that, I can't store separate entity for given event. Right now I'm using BaseEntity which contains ... the entity object after the update with the cloned detached entity object before the update. ObjectDB ...

 
forum_thread

problem with lazy loading - unittest project attached

hi, i'm still testing objectdb together with spring-data-jpa. i made a test which should simulate 4 requests 1. save entity 2. read an existing entity, add onetomany relation 3. read an existing entity, add another onetomany relation 4. read entity, get relations. i have the feeling this is not the optional way to test this, because of the differnt transaction behavior. the test is not transactional, but the spring repository methods are. ... EntityManager is closed and the result object becomes detached. Since the relationship between Foo And Bar is lazy - it is unavailable in a detached Foo instance and the collection looks empty. ...