Re: Owns Destination problem
Re: Owns Destination problem
- Subject: Re: Owns Destination problem
- From: Chuck Hill <email@hidden>
- Date: Tue, 19 Aug 2008 13:43:02 -0700
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.
MS ->>SR Cascade Delete Rule
SR->MS is required by SR
SR->MS Nullify Delete Rule
1) Create a new ManufacturingSchedule
2) saveChanges().
3) Create a new ScheduledRouting, assign the new
ManufacturingSchedule to it's manufacturingSchedule() relationship
using: addObjectToBothSidesOfRelationshipWithKey(object,
MANUFACTURING_SCHEDULE_KEY);
4) remove the ScheduledRouting from the ManufacturingSchedule using:
removeObjectFromBothSidesOfRelationshipWithKey(object,
SCHEDULED_ROUTINGS_KEY);
The "object" in 3 and 4 are different objects, right?
5) saveChanges()
This gives me the validation exception. Should it work, or is this
actually the expected behavior?
I would expect it to work.
If I add a saveChanges() between steps 3 and 4, then it saves both
without any problem after the removal.
No matter how you slice it, that is buggy behavior. For once, it
might not be you. ;-)
Chuck
On Aug 19, 2008, at 2:06 PM, Chuck Hill wrote:
It might be some variation of this:
http://lists.apple.com/archives/webobjects-dev/2008/Aug/msg00079.html
--
Chuck Hill Senior Consultant / VP Development
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
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