You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Mike Kienenberger (JIRA)" <ji...@apache.org> on 2013/09/24 22:29:09 UTC

[jira] [Closed] (CAY-615) Delete Rule Cascade with Deny on reverse relationship always fails.

     [ https://issues.apache.org/jira/browse/CAY-615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mike Kienenberger closed CAY-615.
---------------------------------

    Resolution: Won't Fix

I don't remember why I needed this, and no one else seems to need it.
                
> Delete Rule Cascade with Deny on reverse relationship always fails.
> -------------------------------------------------------------------
>
>                 Key: CAY-615
>                 URL: https://issues.apache.org/jira/browse/CAY-615
>             Project: Cayenne
>          Issue Type: Improvement
>          Components: Core Library
>    Affects Versions: 1.2 branch
>            Reporter: Mike Kienenberger
>            Assignee: Mike Kienenberger
>             Fix For: Undefined future
>
>
> Delete Rule Cascade with Deny on reverse relationship always fails.
> On 7/27/06, Mike Kienenberger <mk...@gmail.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 <an...@objectstyle.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, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira