[OS-JIRA] Created: (CAY-75) Deleting NEW objects is done incorrectly

From: jir..bjectstyle.org
Date: Mon Jan 12 2004 - 11:04:45 EST

  • Next message: Andrus Adamchik: "DataViews and 1.1"

    Message:

      A new issue has been created in JIRA.

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

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

    Here is an overview of the issue:
    ---------------------------------------------------------------------
            Key: CAY-75
        Summary: Deleting NEW objects is done incorrectly
           Type: Bug

         Status: Assigned
       Priority: Major

        Project: Cayenne
       Fix Fors:
                 1.0 [STABLE]
       Versions:
                 1.0 [STABLE]
                 1.1 [DEV]

       Assignee: Andrus Adamchik
       Reporter: Andrus Adamchik

        Created: Mon, 12 Jan 2004 11:04 AM
        Updated: Mon, 12 Jan 2004 11:04 AM

    Description:
    When an object state is NEW, and this object is later deleted via DataContext.deleteObject(..), this doesn't seem to be processed correctly. See a note in the DataContext code:

            //TODO - figure out what to do when an object is still in
            //PersistenceState.NEW (unregister maybe?)
            anObject.setPersistenceState(PersistenceState.DELETED);

    This inconsistency causes various problems downstream. E.g. when trying to rollback:

    java.lang.NullPointerException
    at org.objectstyle.cayenne.access.SnapshotManager.refreshObjectWithSnapshot(SnapshotManager.java:120)
    at org.objectstyle.cayenne.access.DataContext.rollbackChanges(DataContext.java:733)

    Another example is described in this message:

    http://objectstyle.org/cayenne/lists/cayenne-user/2004/01/0021.html

    ---------------------------------------------------------------------
    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 : Mon Jan 12 2004 - 11:04:46 EST