Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.2 branch
-
None
-
M9-B1
Description
Regression: Cayenne M9+ sets DataObjects as "modified" during no-op writeProperties
writeProperty("x", "y") puts dataObject into a modified state when "y" was already the value of "x" before the method call.
Before M9, object would remain in committed state.
Object in my ObjectStore:
<ObjectId:Announcement, ANNOUNCEMENT_ID=200>=
{<ObjectId:Announcement, ANNOUNCEMENT_ID=200>; modified; [enabled=>Y; description=>SNAP; contentList=>(..); effectiveEndDate=>Mon Oct 31 00:00:00 EST 2005; effectiveStartDate=>Thu Sep 01 00:00:00 EDT 2005; qualifiedViewpointList=>(..)]}ObjectDiff of record – appears to indicate that nothing has changed.
Same as the other 4 restored objects.
Comparision of snapshot values to object store values shows nothing different.
value= ObjectDiff (id=3310)
arcSnapshot= HashMap (id=3311)
currentArcSnapshot= null
diffId= 1
flatIds= null
nodeId= ObjectId (id=3309)
objectStore= ObjectStore (id=3200)
otherDiffs= null
snapshot= HashMap (id=3312)
org.objectstyle.cayenne.access.ObjectDiff@133d68a
{}
null
1
null
<ObjectId:Announcement, ANNOUNCEMENT_ID=200>
org.objectstyle.cayenne.access.ObjectStore@c0cf
null
A workaround has been to add code in my BaseDataObject class to check
for the old value equaling the new value in writeProperty(), and if
so, do nothing.