[OS-JIRA] Created: (CAY-266) deleteObject should be changed to deleteObjects

From: jir..bjectstyle.org
Date: Wed Feb 02 2005 - 19:10:43 EST

  • Next message: jir..bjectstyle.org: "[OS-JIRA] Created: (CAY-267) Repackage distro to include dependencies"

    Message:

      A new issue has been created in JIRA.

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

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

    Here is an overview of the issue:
    ---------------------------------------------------------------------
            Key: CAY-266
        Summary: deleteObject should be changed to deleteObjects
           Type: Improvement

         Status: Assigned
       Priority: Minor

        Project: Cayenne
     Components:
                 Cayenne Core Library
       Versions:
                 1.1

       Assignee: Andrus Adamchik
       Reporter: Cris Daniluk

        Created: Tue, 1 Feb 2005 9:45 PM
        Updated: Tue, 1 Feb 2005 9:45 PM

    Description:
    In Cayenne 1.1, many of the DataContext methods that operated on DataObjects individually were converted to operate on Collections of DataObjects instead (i.e. invalidateObject was deprecated and invalidateObjects was created in its place)

    It would be desirable to create deleteObjects(Collection) to replace deleteObject. Currently, to delete all DataObjects that are in a relationship with another DataObject, you have to copy the relationship list, i.e.:

    List removeList = new ArrayList(dataObject.getToManyArray());
    Iterator iter = removeList.iterator();
    while (remove.hasNext()) {
      context.deleteObject((DataObject) iter.next());
    }

    Without the copied list, a ConcurrentModificationException is thrown. By using deleteObjects(), the user can be isolated from this dependancy.

    ---------------------------------------------------------------------
    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 : Wed Feb 02 2005 - 19:10:45 EST