I'm getting a NullPointerException in version 1.1-RC1.
org.objectstyle.cayenne.access.ContextCommit.appendOptimisticLockingAttributes(ContextCommit.java:564) 
org.objectstyle.cayenne.access.ContextCommit.prepareUpdateQueries(ContextCommit.java:426) 
org.objectstyle.cayenne.access.ContextCommit.commit(ContextCommit.java:156)
org.objectstyle.cayenne.access.DataContext.commitChanges(DataContext.java:1231) 
org.objectstyle.cayenne.access.DataContext.commitChanges(DataContext.java:1201) 
I've stepped through the code; the snapshot being retrieved at line 556 
is null, causing the exception a few lines later in snapshot.get(name).
The DataObject is a normal object with state = modified; a new object is 
being added to its to-many relationship. There's only one DataContext in 
use.  If I tell the Modeler not to use optimistic locking for the 
modified object, the exception doesn't happen because 
appendOptimisticLockingAttributes() isn't called.
I copied the snapshot-getting line 556 to my own code for an experiment.
If I replace getRetainedSnapshot() with getSnapshot(objectId, 
dataContext), a non-null snapshot is returned.  That might not be the 
right solution... I just wanted to confirm that the null result was 
coming from getRetainedSnapshot().
This archive was generated by hypermail 2.0.0 : Thu Oct 14 2004 - 12:16:31 EDT