Re: Another JavaClient bug???
Re: Another JavaClient bug???
- Subject: Re: Another JavaClient bug???
- From: Florijan Stamenkovic <email@hidden>
- Date: Sun, 28 May 2006 22:26:03 +0200
Hi Ken,
Flor,
The behavior you're illustrating is possible under certain
circumstances with server-side EOF. The important questions are,
how is the relationship setup, and how are you deleting the
object? Also, when are you calling the books relationship to
test? After save?
The relationship is straightforward. One to many (and inverse), with
properly set both sides. The to-many is set to cascade delete, the to-
one is set to nullify.
The object is being deleted through editingContext.deleteObject(book);
where the editing context is of course the one where both objects are
residing.
The books() relationship is called before the save. Of course that
after the save the objects are refreshed in the editing context, and
then the problem is gone. My idea was that the editing context should
take care to apply deletion rules to the object graph immediately
after the object is deleted. Is that not so with server-side
frameworks???
I'm not sure, but my guess is, if you don't have a relationship
from books back to author with a nullify delete rule, the object
will continue to exist in the books() relationship in author.
See above. And yes, that would cause the issue. It seems however that
the issue *here* is that those delete rules are simply not applied.
Or possibly even not there in the client side EOClassDescriptions.
Current workaround is just to call
book.removeObjectFromBothSidesOfRelationshipWithKey(book.author(),
"author") just before deleting the book.
Flor
_______________________________________________
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