• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Help with SharedEditingContext...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with SharedEditingContext...


  • Subject: Re: Help with SharedEditingContext...
  • From: Art Isbell <email@hidden>
  • Date: Thu, 14 Jul 2005 20:36:10 -1000

On Jul 14, 2005, at 7:27 PM, LD wrote:

Previously, in my Session I was fetching some objects into the defaultEditingContext and when editing a particular EOEnterpriseObject I was creating a child editing context and getting a local instance of the object to adjust. No worries with that.

However, now I'm fetching into the EOSharedEditingContext in main - no problems there, but when I get local instances of those objects in a editing context for a page, a few objects are mysteriously missing.

I've never used a shared editing context where WOSession's default editing context seems appropriate. My reading of the docs (<http://developer.apple.com/documentation/LegacyTechnologies/ WebObjects/WebObjects_4.5/System/Documentation/Developer/WebObjects/ DeltaDoc/EOF.html#CBGCHAIA> or <http://tinyurl.com/a3meb>) suggests that a shared editing context is designed to contain shared objects, those that are available to all sessions, not just in one session.


With this understanding, I've used shared editing contexts only in my Application class as a source of read-mostly objects, the destination objects of whose relationships can only be other shared objects, and that can be the destination objects of any objects' relationships. To me, this relegates shared objects to the class of objects that are stored in what some call code tables; i.e., objects that are unlikely to change and that are used to define other objects.

You state that you "get local instances of those objects in a editing context for a page". If you mean that you are faulting objects from the shared editing context to another editing context, then you aren't taking advantage of an important feature of a shared editing context: its objects do not need to be faulted into an editing context whose sharedEditingContext() is the shared editing context containing the objects of interest. However, in your code, you are explicitly sending an editing context a setSharedEditingContext(null) message which will disable the ability to use shared objects in an editing context without faulting them in. So I don't understand what advantage using a shared editing context has in this case.

Because I don't have experience using a shared editing context as you are, I can't explain the behavior that you are experiencing. It seems to me that you would be better off using the WOSession's default editing context except when you truly have shared objects that can be fetched into the default shared editing context in your Application class. But maybe I'm not understanding...

Aloha,
Art

_______________________________________________
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


  • Follow-Ups:
    • Re: Help with SharedEditingContext...
      • From: LD <email@hidden>
References: 
 >Help with SharedEditingContext... (From: LD <email@hidden>)

  • Prev by Date: Deployment Problems WO 5.2 2003 Server - "Page Not Found"
  • Next by Date: Re: Help with SharedEditingContext...
  • Previous by thread: Help with SharedEditingContext...
  • Next by thread: Re: Help with SharedEditingContext...
  • Index(es):
    • Date
    • Thread