[JIRA] Created: (CAY-615) Delete Rule Cascade with Deny on reverse relationship always fails.

From: Mike Kienenberger (JIRA) ("Mike)
Date: Fri Jul 28 2006 - 13:55:48 EDT

  • Next message: Bill Dudney: "more maven questions"

    Delete Rule Cascade with Deny on reverse relationship always fails.
    -------------------------------------------------------------------

             Key: CAY-615
             URL: http://issues.apache.org/cayenne/browse/CAY-615
         Project: Cayenne
            Type: Improvement

      Components: Cayenne Core Library
        Versions: 1.2 [STABLE]
        Reporter: Mike Kienenberger
     Assigned to: Mike Kienenberger

    Delete Rule Cascade with Deny on reverse relationship always fails.

    On 7/27/06, Mike Kienenberger <mkienen..mail.com> wrote:
    > Does the Deny still happen if the only
    > reverse-relationship value is the cascading original object to be
    > deleted?

    On 7/27/06, Andrus Adamchik <andru..bjectstyle.org> wrote:
    > Doesn't look like DataContextDeleteAction is smart about it:
    >
    > if (relatedObjects.size() == 0) {
    > continue;
    > }
    >
    > // process DENY rule first...
    > if (relationship.getDeleteRule() == DeleteRule.DENY) {
    > object.setPersistenceState(oldState);
    >
    > String message = relatedObjects.size() == 1
    > ? "1 related object"
    > : relatedObjects.size() + " related objects";
    > throw new DeleteDenyException(object,
    > relationship.getName(), message);
    > }
    >
    > To handle cascade/deny combination we may need to change this code to
    > check that at least one object in 'relatedObjects' collection is
    > itself not deleted.

    -- 
    This message is automatically generated by JIRA.
    -
    If you think it was sent incorrectly contact one of the administrators:
       http://issues.apache.org/cayenne/secure/Administrators.jspa
    -
    For more information on JIRA, see:
       http://www.atlassian.com/software/jira
    



    This archive was generated by hypermail 2.0.0 : Fri Jul 28 2006 - 13:58:15 EDT