Re: Nullify rule not being invoked?
Re: Nullify rule not being invoked?
- Subject: Re: Nullify rule not being invoked?
- From: Jonathan Rochkind <email@hidden>
- Date: Mon, 08 Sep 2003 17:13:15 -0500
For reasons I can't explain, this behavior turned out to be some kind
of consequence of my least favorite, most mysterious, hardest to explain
Apple bug.
http://wodev.spearway.com/cgi-bin/WebObjects/WODev.woa/wa/Main?wikiPage=Weird52EOFBug
The "Project" entity had one of those 'automatically converted boolean'
attributes in it. Don't know how the heck that caused the behavior I was
seeing, but getting rid of it solved things. Man, I hate that bug. Man, I
hope Apple fixes it in the next release. Man, I wish there was some way to
just TURN OFF the completely undocumented 'automatic boolean conversion'
feature added, without any notice whatsoever, in WO 5.0, that causes these
problems.
--Jonathan
At 04:16 PM 9/8/2003 -0500, Jonathan Rochkind wrote:
I have a weird situation where the nullify rule isn't being invoked.
Let's call the objects involved Department <->> Employee <->> and
Project. Let's say they are all hiearchically defined, in terms of the
delete rules. Department delete cascades to Employees cascades to Project.
And 'nullify' in the opposite direction.
If I delete an Employee that does not have any Projects----then everythign
works fine. The corresponding Department no longer has that Employee
listed in it's employees() list. The nullify rule from Employee to
Department worked fine. BUT. If I delete an Employee that DOES have one
or more Projects---the Employee is deleted, the Projects are deleted
(cascade from Employee to Project worked), but, the Department still has
the now-deleted Employee listed in it's employees(). The nullify rule from
Employee to Department did not work.
I'm probably just going to add a 'department().removeFromEmployees()' call
in my logic prior to deleting the Employee. It's easier than trying to
track down this bug, whether Apple's bug or mine. But that really
shouldn't be neccesary. I wish I knew what was going wrong instead. Has
anyone encountered this before?
--Jonathan
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.