Re: Enable cascade persist globally and pro grammatically

2014-06-13 Thread Rick Curtis
You can enable cascade persist globally via the jpa defined persistence-unit-metadata defauls element in the orm.xml See the snippet below: http://java.sun.com/xml/ns/persistence/orm"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://java.sun.com/xml/ns/persist

org.apache.openjpa.persistence.EntityNotFoundException: The instance of type "class com.test.testapp.model.ConcreteRecord" with OID "X-Y" no longer exists in the data store. This may mean that you de

2014-06-13 Thread Bardioc
Hello, I've the following situation which indeed drives me crazy, cause I cannot find a solution for it. I have an entity called Person that has a OneToMany-Relationship with CascadeType.ALL and orphanRemoval to an entity called Lock. This allows the user to place a lock on certain information fo

Re: Enable cascade persist globally and pro grammatically

2014-06-13 Thread Mansour Al Akeel
Rick, Thank you a lot for your help. I am wondering if this can be done programmatically AND at runtime (After the entityManager is created). Thank you. On Fri, Jun 13, 2014 at 9:18 AM, Rick Curtis wrote: > You can enable cascade persist globally via the jpa defined > persistence-unit-metadat

Re: Enable cascade persist globally and pro grammatically

2014-06-13 Thread Rick Curtis
> I am wondering if this can be done programmatically AND at runtime (After the entityManager is created). Yes I'm sure it is possible to do programmatically. The problem you're going to run into with changing this after the EntityManager is loaded is that we will have already processed all of our