[JIRA] Created: (CAY-512) Regression: Cayenne M9+ sets DataObjects as "modified" during no-op writeProperties

From: Mike Kienenberger (JIRA) ("Mike)
Date: Mon Apr 17 2006 - 10:04:42 EDT

  • Next message: Cris Daniluk: "docs sample"

    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.ObjectDif..33d68a
    {}
    null
    1
    null
    <ObjectId:Announcement, ANNOUNCEMENT_ID=200>
    org.objectstyle.cayenne.access.ObjectStor..0cf
    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
    



    This archive was generated by hypermail 2.0.0 : Mon Apr 17 2006 - 10:05:41 EDT