Cayenne
  1. Cayenne
  2. CAY-512

Keep DataObjects in commited state for no-op writeProperties

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.2 branch
    • Fix Version/s: Undefined future
    • Component/s: Core Library
    • Labels:
      None
    • Environment:
      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

      {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.

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Andrus Adamchik
            Reporter:
            Mike Kienenberger
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development