About detached


makeTransientAll(useFetchPlan, pcs)

Make instances transient, removing them from management by this PersistenceManager.(Method of javax.jdo.PersistenceManager)


Optimistic locking: prevent version increment on entity collection attribute

Hello, I have an entity E with an attribute which is a collection of entities (one to many relationship) with an optimistic locking strategy supported by a version field. Is it possible to prevent the increment of the version of entity E when entities are added to or removed from the collection? Something like the equivalent of @OptimisticLock(excluded=true) in Hibernate? Thanks, Farid ... same call? If the problem is that the entity is detached between the calls, check this issue and the no-detach ... how Documents found by query in that transaction could be detached when I try to access the collection with the same EntityManager in the ...


Different behavior with persist() and queried instances?

Hi, We have a simple class that by itself contains (among others) a property pointing to a collection: class Bla {  @OneToMany(cascade = CascadeType.ALL) private List<AttributeEntity> metaAttributes = new ArrayList<AttributeEntity>(); } ... calls I do close the entity manager so my object gets detached. Between the persist() and the commit() call, my list property seems ...


migration path from JPA / Hibernate

Hi. Is there a conversion tool or documentation that is of help when migrating an existing JPA solution to ObjectDB? Any recommendations or known pitfalls when it comes to ...   #1 2011-03-30 13:10 Hi. Is there a conversion tool or documentation that is of help when migrating an existing JP ...


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 ... is filled automatically. Unless the Node object is detached , for example if the EntityManager is already closed. As ...


Possible issue with Spring JPA and Embedded

Hello, ... between the two tests is that Spring JPA returns detached objects. A collection of embedded objects is loaded lazily by ...


Puzzler: Not getting cascades on read from Spring context

I've determined that the database is correctly initialized, looking at it from the Object Explorer, I can run the code that loads the database in a Junit test and it's initializing the children objects correctly, but in the application running in Jetty with Spring, fetching is not cascading. My best guess is that perhaps I have something misconfigured in my persistence.xml or my context.    -dh ... Fetching doesn't work by default for detached objects. Please read see this issue  and as a ...



I'm getting a new InternalException (see below). No repeatable example as yet but will work on that and let you know as soon as we have one. If there's anything in the exception which could help us narrow down the problem please let me know. ... (at the end of commit). Apparently the specific detached object that causes the exception has no id (primary key) fields. ...


Items in list are doubled, when the entity class is not enhanced

Dear all, I have a problem with adding items (entities) into other entity list. When the classes are not enhanced, added items are doubled. Here is an example: ... on a managed Customer instance (which has never been detached). According to JPA - the merge operation is ignored for ... a line with em.contains check, so merge is called only on detached entities. If objectdb follows jpa, maybe we should ask jpa creators ...


JDO sequences from ORM file

I want to use sequences in JDO without using annotations. Normally this is done with a package-X.orm file, where X is a value passed to the PersistenceManagerFactory as the value of property "mapping". I'm encouraged to see that the JDO zip that comes with ObjectDB includes the DTD/XSD for this type of file, though I can't see a mention of it in the manual. #1 2013-03-12 17:07 I want to use sequences in JDO without using annotations. Normally this is done with a package-X.orm file, where ...