• 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: Does "cascade delete" drill down multiple teirs?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Does "cascade delete" drill down multiple teirs?


  • Subject: Re: Does "cascade delete" drill down multiple teirs?
  • From: Dan Grec <email@hidden>
  • Date: Wed, 18 Mar 2009 09:40:09 -0600

Thanks for the replies all.

We found we hadn't been using "Owns Destination" properly in our model.
We also had to set the inverse relationship from Address -> Employee as an attribute, then things were fine.


-Dan

On 17-Mar-09, at 4:54 PM, David Avendasora wrote:


On Mar 17, 2009, at 6:31 PM, Dan Grec wrote:

Hey everyone,

Simple setup in the model as follows:

A Branch has many Employees with a cascade delete rule.
An Employee has many Addresses with a cascade delete rule.

When I delete a Branch, I would like EOF to automatically delete all of the associated Employees (which it is doing)
and then cascade down and delete all of the Addresses that are associated to all of those Employees (which it is not doing)


Is EOF supposed to do this?

Yes, it is. And does if everything in the model is configured correctly. This is a big if because there's a lot of opportunities to get things wrong.


Any ideas why it is not?

Most likely another setting on on either the Employee ->> Address relationship or the inverseAddress -> Employee relationship. if the Address can't exist without an Employee attached to it, then you should set Owns Destination on the Employee ->> Address relationship and the Address -> Employee should be not be Optional.


I've found that Owns Destination and Cascade delete rules to be tricky to get just right, you have to be very aware of what your inverse-relationship settings are. If they're not just right, it can cause weird behaviors and errors, including Undo Manager problems.

Also, what version of WOLips are you using? The old Stable version (pre New Hotness) had a bug in EOModeler that caused it to not update the Owns Destination (or other checkboxes) on the advanced tab of the relationship properties, so things may not be set the way you think they are. Selecting an attribute then back to the relationship will reset the checkboxes.

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: 
 >Does "cascade delete" drill down multiple teirs? (From: Dan Grec <email@hidden>)
 >Re: Does "cascade delete" drill down multiple teirs? (From: David Avendasora <email@hidden>)

  • Prev by Date: Tip : How to fix some permissions problems to launch apps
  • Next by Date: [ANN] WOCommunity Maven Repository
  • Previous by thread: Re: Does "cascade delete" drill down multiple teirs?
  • Next by thread: Re: Unique Fields in Database
  • Index(es):
    • Date
    • Thread