Re: Yes, even one more concurrency question - relationship "freshness"
Re: Yes, even one more concurrency question - relationship "freshness"
- Subject: Re: Yes, even one more concurrency question - relationship "freshness"
- From: Miguel Arroz <email@hidden>
- Date: Mon, 13 Aug 2007 23:42:48 +0100
Hi!
Have you tried
a.removeObjectFromBothSidesOfRelationship( obj, "bs" );
Same result.
Have you made other changes in the EC? If not, ec.revert() should
handle all this much more cleanly.
I did! :( The problem is this: the user changes one object. Then,
I'm going to try to save the object, but the changes to that object
requires me to change some other objects and create some new ones
(the Bs).
If I have an OL failure, I must recalculate some stuff again, and
I have to delete and regenerate the Bs, because the number of Bs
needed, and their data, may be different, because they are based not
only on the object I'm changing, but also on the data I refault.
Does something else have a relation to the B entity?
B has two relationships. One of them is two-ways (from B to A),
and it also relates with other object, but one-way only (no inverse
relationship exists). I'll try to explicitly set that relationship to
null, although it appears to be null at the critical time.
e only other thing that comes to mind is the ec.undoManager().
Perhaps this is getting called at somepoint and undoing your
deletion of the new B objects. ec.revert()...
I can't revert, unfortunately. :( If I can't find the problem, I
think I'll change this to a more simple way of doing things, where I
create the context, get the object, apply changes, try to do all my
neat stuff, and if the save fails, trash the EC, create a new one,
get the object, reapply changes, do all the neat stuff again, and so
on. That way I should have less problems, although it's not so nice
in terms of elegance (not that the currently solution is a top model,
but...).
BTW, on the next WOWODC (I *do* promise that the videos will be
recorded in a better way, I still kick myself every-time I think
about that), I suggest some sessions about concurrency. Lots of them.
I suspect there are tons of WO apps out there with hidden problems.
Or maybe it's just me.
Yours
Miguel Arroz
Miguel Arroz
http://www.terminalapp.net
http://www.ipragma.com
_______________________________________________
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