Community
Participate
Working Groups
Build Identifier: Suppose you have a cross resource containment reference and you want to remove an object from it, together with its resource (it's the only object in its resource). I tried this sequence: 1. Remove object from reference 2. Remove object's resource using Resource.delete() 3. Commit For me it fails with org.hibernate.ObjectDeletedException: deleted object would be re-saved by cascade (remove deleted object from associations) After some debugging I decided to add one extra step: 1. Remove object from reference 2. Remove object from its resource << EXTRA STEP 3. Remove object's resource using Resource.delete() 4. Commit Now it fails with org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1 I do not have teneo.mapping.cascade_policy_on_containment set in my cdo-server.xml (my understanding is that it is set to ALL by default). I'm using the latest 4.0 milestone of CDO. Reproducible: Always Steps to Reproduce: Use attached test class together with code from org.eclipse.emf.cdo.examples.hibernate.client bundle. Note that you may need to run each test method on a fresh database, otherwise they will fail with the same (first) exception.
Created attachment 186003 [details] Test class illustrating the problem
Created attachment 186104 [details] Test v2 This patch works with our test bed. The tests pass, though...
Note, currently org.eclipse.emf.teneo.annotations needs to be recompiled because it was compiled for Java 6.0!
One more note: bothe tests are passing in both, our normal test suite and the Hibernate test suite.
Eike, I'll check it again and look for possible differences between your environment and mine. If the tests pass for you, then I must be doing something wrong (a probably stupid ;) Can you point me to any resources that desribe configuration of your testbed?
We don't have descriptions of the test process. If you follow http://wiki.eclipse.org/CDO_Source_Installation then you should find some launch configs in your run menu/dialog. Try "CDO AllTests (Hibernate)"...
Moving all open bug reports to 4.1 because the release is very near and it's hghly unlikely that there will be spare time to address 4.0 problems. Please make sure that your patches can be applied against the master branch and that your problem is not already fixed there!!!
Moving all open issues to 4.2. Open bugs can be ported to 4.1 maintenance after they've been fixed in master.
Thanks for the testcase, I added it to the hibernate test suite. The testcase passes for the hibernate store. I recently made several changes to the hibernate store, including a better synchronization of hibernate optimistic locking/versioning with the CDO versioning mechanism. I guess these changes solve the issue. Can you retry with a new 4.2 build (will be available later this week)? Please re-open the issue if it still occurs. gr. Martin