About EntityManager

release

2.7.2

... an exception when accessing an object with a closed EntityManager . Fixed a bug in viewing content of a TreeMap ... error message for creating a query with a closed EntityManager ( issue #182 ). Version 2.4.6 ...

 
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. ... not annotated with  @Transactional - an ad hoc EntityManager instance is prepared for running findOne , and when the query execution completes that EntityManager is closed and the result object becomes detached. Since ...

 
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?... The L1 cache is per EntityManager / PersistenceManager and the L2 cache is per ... / PersistenceManagerFactory , i.e. shared by multiple EntityManager / PersistenceManager instances. There are also other ...

 
forum_thread

Fetching Collections Puzzle

I am working on a project where I need to travel through a massive graph of objects. One of the main entity is the Node which is shown below. class Node { Node parent List<Node> children Node rightSibling Node leftSibling int rank } I have the following issues/doubts ... the Node object is detached , for example if the EntityManager is already closed. As you wrote - if the children ...

 
forum_thread

One transaction or two?

If I have a large number of objects to delete and then add to a PersistenceManager is it more efficient to do everything in one transaction or two? Currently my code looks like this: ... The overhead of creating an EntityManager / PersistenceManager is low. ObjectDB already manages a ... But ObjectDB doesn't use a pool of  EntityManager / PersistenceManager instances (just of some underlying ...

 
issue

Named Query Exception

[ObjectDB 2.4.6_06] Unexpected exception (Error 990)   Generated by Java HotSpot(TM) Client VM 1.6.0_25 (on Windows 7 6.1). Please report this error on http://www.objectdb.com/database/issue/new com.objectdb.o.InternalException: java.lang.NullPointerException: null java.lang.NullPointerException at com.objectdb.o.LFL.X(LFL.java:1154) at com.objectdb.o.LFL.P(LFL.java:934) at com.objectdb.o.FIW.af(FIW.java:94) at com.objectdb.o.FIW.ad(FIW.java:55) at com.objectdb.o.SSS.aj(SSS.java:907)... indicate an attempt to create a query using a closed EntityManager . If this is the case, a better error message should be ... Please make sure that you are using an open EntityManager. ObjectDB Support ObjectDB - Fast ...

 
forum_thread

OneToMany and cascade delete problem

Hi, I don't really know if this is a bug or maybe model that I make is bad. I have a problem with with two different classes with OneToMany relation to one, shared class. For example (first class): @Entity public static class Store { @OneToMany(targetEntity = Offer.class, mappedBy = "store") private List<Offer> offers; } second class: ... broken relationship). When using a short term EntityManager for updating the owner side without working with the mapped by ... be updated when it is later retrieved using another  EntityManager . But if the same  EntityManager is used for operations ...

 
release

2.4.1

... file is empty ( issue #142 ). Removed EntityManager conflict checks in NO DETACH mode . Fixed a ... Fixed merging entity objects of another EntityManager . Fixed a bug in concurrent EntityManagerFactory ...

 
release

2.4.0

... file is empty ( issue #142 ). Removed EntityManager conflict checks in NO DETACH mode . Fixed a ... Fixed merging entity objects of another EntityManager . Fixed a bug in concurrent EntityManagerFactory ...

 
page

ObjectDB Object Database Features

ObjectDB provides a rich set of features, many of them as the result of supporting the JPA and JDO APIs.... L1 entity object cache (per EntityManager). L2 shared entity data ... Online backup by a simple query on an EntityManager / PersistenceManager . ...