You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cayenne.apache.org by Mike Kienenberger <mk...@gmail.com> on 2006/04/14 21:44:28 UTC
Objects marked as modified with no changes?
Is the new implementation of localObject incorrectly marking objects
as modified? At this point in my app, all objects should be in the
committed state as all I've done is issue a request, fetch some
objects, serialize them, go to the next request, and restore them.
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}
I'm going to try reverting back to M11.
Re: Objects marked as modified with no changes?
Posted by Mike Kienenberger <mk...@gmail.com>.
Ok. The problem started happening between M8 and M9.
Looks like a regression -- I'll open an issue.
On 4/14/06, Mike Kienenberger <mk...@gmail.com> wrote:
> On 4/14/06, Mike Kienenberger <mk...@gmail.com> wrote:
> > I'm going to try reverting back to M11.
>
> I've hit this with M11, M10, and M9. M8 is when the hsqldb switchover
> occurred, so it's too much of a pain to test earlier versions right
> now.
>
> Turns out that JSF is automatically resetting DataObject properties
> back to the same value they had before. Now I'm pretty sure I wasn't
> seeing this behavior in older versions of Cayenne. I'll need to give
> the M5 version a try again when I get a chance to verify.
>
> 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.
>
Re: Objects marked as modified with no changes?
Posted by Mike Kienenberger <mk...@gmail.com>.
On 4/14/06, Mike Kienenberger <mk...@gmail.com> wrote:
> I'm going to try reverting back to M11.
I've hit this with M11, M10, and M9. M8 is when the hsqldb switchover
occurred, so it's too much of a pain to test earlier versions right
now.
Turns out that JSF is automatically resetting DataObject properties
back to the same value they had before. Now I'm pretty sure I wasn't
seeing this behavior in older versions of Cayenne. I'll need to give
the M5 version a try again when I get a chance to verify.
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.