Re: How to enable cascade-persistence globally

2012-06-21 Thread Waruna Ranasinghe
Hi Rick, I encountered this issue while I was upgrading the OpenJPA version of Apache JUDDI 3.0.3 from 1.2.0 to 2.2.0. And I'm not much aware of the source code of JUDDI as well. I just ran the tests of JUDDI which let me to reproduce the error. I'll try to put together a minimal unit test.

Re: How to enable cascade-persistence globally

2012-06-20 Thread Rick Curtis
Waruna - Can you try setting this property ? openjpa.Compatibility=CheckDatabaseForCascadePersistToDetachedEntity=false Thanks, Rick On Wed, Jun 20, 2012 at 12:08 AM, Waruna Ranasinghe waruna...@gmail.comwrote: Hi Rick, I tried setting the CascadeType.ALL, then I get the following

Re: How to enable cascade-persistence globally

2012-06-20 Thread Waruna Ranasinghe
Hi Rick, after setting openjpa.Compatibility=CheckDatabaseForCascadePersistToDetachedEntity=*true* The issue is fixed. Thanks a lot for the help. Thanks, Waruna On 20 June 2012 19:24, Rick Curtis curti...@gmail.com wrote: Waruna - Can you try setting this property ?

Re: How to enable cascade-persistence globally

2012-06-20 Thread Rick Curtis
Waruna - Glad to hear that it solved your problem... but I'm still interested in what was going on. Would you be able to put together a small unit test that recreates this issue? I'd like to dig in to make sure that there isn't still a bug in OpenJPA code. Thanks, Rick On Wed, Jun 20, 2012 at

How to enable cascade-persistence globally

2012-06-19 Thread Waruna Ranasinghe
Hi all, I would like to know whether I can set cascade-persistence globally through the persistence.xml I found that I set this in orm.xml, but it did not work. See the configuration below entity-mappings xmlns=http://java.sun.com/xml/ns/persistence/orm;

Re: How to enable cascade-persistence globally

2012-06-19 Thread Rick Curtis
Waruna - For giggles, can you try to manually set the field in question(erro) to CascadeType.ALL? This might help us narrow down where the real problem is. Thanks, Rick On Tue, Jun 19, 2012 at 6:43 AM, Waruna Ranasinghe waruna...@gmail.comwrote: Hi all, I would like to know whether I can

Re: How to enable cascade-persistence globally

2012-06-19 Thread Waruna Ranasinghe
Hi Rick, I tried setting the CascadeType.ALL, then I get the following exception. Does this mean that the client application is trying to create two objects with the same oid? The thing is this code works fine with OpenJPA 2.0.0 but if we use OpenJPA 2.2.0, then these errors occur. Caused by: