OptimisticLockTest was failing on certain databases because the test was poorly written; it was relying on my local setting of not using statement batching for versioned data. I have updated the test to explicitly disable batching of versioned data.
Try adding the following to your local copy and see if that fixes the error you see. If not open a JIRA case with the failure, as that would be a bug. -----Original Message----- From: Josh Moore [mailto:[EMAIL PROTECTED] Sent: Thursday, August 31, 2006 8:10 AM To: Steve Ebersole Cc: Max Andersen; hibernate-dev@lists.jboss.org; [EMAIL PROTECTED] Subject: Re: [hibernate-dev] Possible to confirm that versioning is broken forPersistentSets? Ok. The isDirty()/write()/add()/clearDirty() idiom explains why the patch was producing NPEs in other tests. Otherwise, the only other failures that seemed they could be related were from the optlock tests. Two were failing earlier (see http://opensource.atlassian.com/projects/hibernate/secure/attachment/125 60/TEST-org.hibernate.test.optlock.OptimisticLockTest.txt) but all are failing with the patch, e.g.: Testcase: testOptimisticLockAllDelete took 0.134 sec Caused an ERROR Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1 ~Josh. Steve Ebersole wrote: > I've made some changes here locally which attempt to group fixes to a > bunch of these seemingly related issues. So for PersistentSet.add() > (for example), I have: > > > public boolean add(Object value) { > Boolean exists = isOperationQueueEnabled() ? > readElementExistence(value) : null; > if ( exists == null ) { > boolean initiallyDirty = isDirty(); > write(); > boolean actuallyAdded = set.add( value ); > if ( !actuallyAdded ) { > if ( ! initiallyDirty && isDirty() ) { > clearDirty(); > } > } > return actuallyAdded; > } > else if ( exists.booleanValue() ) { > return false; > } > else { > queueOperation( new SimpleAdd(value) ); > return true; > } > } > > But I need to get time to properly test these changes before I commit > them. _______________________________________________ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev