Re: PersistenceState relation to property changes

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Sat Aug 27 2005 - 12:10:51 EDT

  • Next message: Jerome Chan: "Re: Trying to update meta data on objects which are saved"

    On Aug 26, 2005, at 4:25 PM, Sean Tan wrote:

    > 1. Cayenne relies on DataContext.hasChanges() to know whether there is
    > any real modifications. But this only allows Cayenne to know whether
    > there are any modifications within the DataContext, not based on
    > individual DataObjects.
    > 2. Due to the above, once there is a single modified DataObject within
    > the DataContext, the validate* methods will be called for all
    > DataObjects marked modified.
    >
    > As such, I think your suggestion does not work.

    This is a bug. I just reproduced this behavior in a simple test:

    http://objectstyle.org/jira/secure/ViewIssue.jspa?key=CAY-355

    We shouldn't call validateForSave on "phantom" modifications.

    Andrus



    This archive was generated by hypermail 2.0.0 : Sat Aug 27 2005 - 12:10:53 EDT