FAQ
Regression: Cayenne M9+ sets DataObjects as "modified" during no-op writeProperties
-----------------------------------------------------------------------------------

Key: CAY-512
URL: http://issues.apache.org/cayenne/browse/CAY-512
Project: Cayenne
Type: Bug

Components: Cayenne Core Library
Versions: 1.2 [BETA]
Environment: M9-B1
Reporter: Mike Kienenberger
Fix For: 1.2 [BETA]


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
{enabled=Y, description=SNAP, effectiveEndDate=Mon Oct 31 00:00:00 EST
2005, effectiveStartDate=Thu Sep 01 00:00:00 EDT 2005}

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.



--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/cayenne/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 1 | next ›
Discussion Overview
groupdev @
categoriescayenne
postedApr 17, '06 at 2:05p
activeApr 17, '06 at 2:05p
posts1
users1
websitecayenne.apache.org

1 user in discussion

Mike Kienenberger (JIRA): 1 post

People

Translate

site design / logo © 2021 Grokbase