Re: Does "cascade delete" drill down multiple teirs?
Re: Does "cascade delete" drill down multiple teirs?
- Subject: Re: Does "cascade delete" drill down multiple teirs?
- From: David Avendasora <email@hidden>
- Date: Tue, 17 Mar 2009 18:54:57 -0400
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