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: Nested Editing Contexts



On 30.05.2007, at 13:03, Steven Mark McCraw wrote:

You have stumbled upon what I believe to be one of the biggest weaknesses in EOF, and the solutions are (again, in my opinion) terrible.

Hmmm. Interesting opinion. I always see the concept of "sandboxes" (editingContexts) as one of the big advantages of EOF. It keeps track of the object graph.


As you've noticed, if you insert things into an editing context as they are created, you end up with a bunch of uninitialized objects in the database.

You do only if you don't use it properly. You don't save an editingContext with stuff you don't want to have in the database - that is why you don't use the defaultEditingContext for that. It's the same that you wouldn't commit a database transaction with stuff you don't want to have in there.


If you use an editing context other than the session's default editing context, I believe you have to explicitly lock and unlock it before and after any messages to the ec or changes to the state of the objects it contains.

Yes, that is correct. You have to lock everything but the defaultEditingContext.


But I agree with you, that Apple should make that clearer in the documentation. Even the examples and things like "out of the box DirectToWeb" uses the defaultEditingContext and that is the main problem here. If the would introduce the editingContext concept properly most people won't have these crappy experiences.

cug
_______________________________________________
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: 
 >Nested Editing Contexts (From: "Ted Archibald" <email@hidden>)
 >Re: Nested Editing Contexts (From: Steven Mark McCraw <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.