• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Owns Destination & Deny
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Owns Destination & Deny


  • Subject: Re: Owns Destination & Deny
  • From: David Avendasora <email@hidden>
  • Date: Fri, 6 Mar 2009 14:46:25 -0600


On Mar 6, 2009, at 2:19 PM, Ramsey Gurley wrote:


On Mar 2, 2009, at 3:20 PM, Chuck Hill wrote:


On Mar 2, 2009, at 7:05 AM, David Avendasora wrote:

Hi all, mostly my future self.

When I have a relationship setup that has the following settings:
1) Owns Destination
2) Delete Rule of Deny
3) Inverse relationship is Optional (I think this should be impossible if the object is owned)


I get the following error when I try to delete an instance:

java.lang.IllegalStateException: undo: undo manager is in invalid state, undo was called with too many nested undo groups

I don't know if this impacts anything other than Java Client, but I've run into it several times and every time I search on this, I only find my posts.

Would it make sense to have a validation rule in Entity Modeler that the inverse relationship of an "Owns Destination" relationship cannot be optional?


I can't think of any case where it being optional would be correct. That sounds like a good validation. File 'em Dano.


Chuck

After thinking about this a bit more, I think the problem with the relationship here is the Deny, not the optional reverse. If the whole point of Owns Destination is to delete the child object when its relationship to parent is set to null, then requiring mandatory on the parent relationship defeats the purpose of Owns Destination, no? The relationship could never be set to null... What would be the point of setting Owns then?

I think I now understand. One is a validation rule (optional/required) the other is a behaviour rule (owns destination). The behaviour (deleting the child object) will happen before the validation runs. This way you can simply remove an child from the parent, even though the parent is required, and it will be deleted for you automatically and never trigger the validation exception.


Dave

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Owns Destination & Deny (From: David Avendasora <email@hidden>)
 >Re: Owns Destination & Deny (From: Chuck Hill <email@hidden>)
 >Re: Owns Destination & Deny (From: Ramsey Gurley <email@hidden>)

  • Prev by Date: Re: Owns Destination & Deny
  • Next by Date: Re: Jad?
  • Previous by thread: Re: Owns Destination & Deny
  • Next by thread: Re: Owns Destination & Deny
  • Index(es):
    • Date
    • Thread