[OS-JIRA] Created: (CAY-355) "validateForX" is called inconsistently

From: jira-norepl..bjectstyle.org
Date: Sat Aug 27 2005 - 12:10:35 EDT

  • Next message: jira-norepl..bjectstyle.org: "[OS-JIRA] Created: (CAY-356) Pessimistic locking"

    Message:

      A new issue has been created in JIRA.

    ---------------------------------------------------------------------
    View the issue:

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

    Here is an overview of the issue:
    ---------------------------------------------------------------------
            Key: CAY-355
        Summary: "validateForX" is called inconsistently
           Type: Bug

         Status: Assigned
       Priority: Minor

        Project: Cayenne
     Components:
                 Cayenne Core Library
       Fix Fors:
                 1.2 [DEV]
       Versions:
                 1.2 [DEV]

       Assignee: Andrus Adamchik
       Reporter: Andrus Adamchik

        Created: Sat, 27 Aug 2005 12:09 PM
        Updated: Sat, 27 Aug 2005 12:09 PM

    Description:
    A problem originally described here: http://objectstyle.org/cayenne/lists/cayenne-user/2005/08/0077.html

    "validateFor**" is called for "phantom" modifications in some circumstances, but not others. Consider this example:

    1. Prepare: fetch a few committed objects:

     List objects = context.performQuery(new SelectQuery(SomeObject.class));
     SomeObject s1 = (SomeObject) scenes.get(0);
     SomeObject s2 = (SomeObject) scenes.get(1);

    2. Case 1: make a phantom modification:

     s1.setDescription(s1.getDescription());

     // "s1.validateForSave" is NOT CALLED
     context.commitChanges();

    3. Case 2: make a phantom modification and some other unrelated object modification:
     // "phantom" modification - the property is really unchanged
     s1.setDescription(s1.getDescription());

     // some other unrelated object modification
     s2.setDescription(s2.getDescription() + "_x");

     // "s1.validateForSave" is CALLED
     context.commitChanges();

    In case 2 s1.validateForSave shouldn't be invoked.

    ---------------------------------------------------------------------
    JIRA INFORMATION:
    This message is automatically generated by JIRA.

    If you think it was sent incorrectly contact one of the administrators:
       http://objectstyle.org/jira/secure/Administrators.jspa

    If you want more information on JIRA, or have a bug to report see:
       http://www.atlassian.com/software/jira



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