Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Yes, even one more concurrency question - relationship "freshness"



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:
http://lists.apple.com/mailman/options/webobjects-dev/email@hidden

This email sent to email@hidden
References: 
 >Yes, even one more concurrency question - relationship "freshness" (From: Miguel Arroz <email@hidden>)
 >Re: Yes, even one more concurrency question - relationship "freshness" (From: Chuck Hill <email@hidden>)
 >Re: Yes, even one more concurrency question - relationship "freshness" (From: Miguel Arroz <email@hidden>)
 >Re: Yes, even one more concurrency question - relationship "freshness" (From: Chuck Hill <email@hidden>)
 >Re: Yes, even one more concurrency question - relationship "freshness" (From: Miguel Arroz <email@hidden>)
 >Re: Yes, even one more concurrency question - relationship "freshness" (From: Chuck Hill <email@hidden>)
 >Re: Yes, even one more concurrency question - relationship "freshness" (From: Miguel Arroz <email@hidden>)
 >Re: Yes, even one more concurrency question - relationship "freshness" (From: Chuck Hill <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.