Re: Owns Destination problem
Re: Owns Destination problem
- Subject: Re: Owns Destination problem
- From: Lachlan Deck <email@hidden>
- Date: Wed, 20 Aug 2008 12:31:00 +1000
On 20/08/2008, at 8:24 AM, Chuck Hill wrote:
On Aug 19, 2008, at 2:07 PM, David Avendasora wrote:
On Aug 19, 2008, at 4:43 PM, Chuck Hill wrote:
On Aug 19, 2008, at 12:22 PM, David Avendasora wrote:
Noooooo! Sob. Sniff.
This does sound really similar, but I'm not convinced yet that
what I'm doing _should_ work. Here's the exact flow. I'm the only
one using the app and I'm using the Default Editing Context.
For review:
ManufacturingSchedule <->> ScheduledRouting
MS->>SR Owns Destination
I don't think this does anything for to-many relationships. The
interplay between Owns Destination and Cascade Delete has always
seems confusing to me.
In this situation, Owns Destination is what I'm counting on
triggering the deletion of the a ScheduledRouting when the
ScheduledRouting's relationship to ManufacturingSchedule is made
null - which is very counter-intuitive, because how does the
ScheduledRouting know about ManufacturingSchedule's "Owns
Destination" relationship back to it?
It would happen, I'd think, in
removeObjectFromBothSidesOfRelationshipWithKey. But I am uncertain
if that works with to-many.
Why not simply ec.deleteObject(scheduledRoutingToDelete); ?
Rather than removingFromBothSides then saving. Delete, save... you'll
find it's removed :-)
with regards,
--
Lachlan Deck
_______________________________________________
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