• 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: EOEditingContext in Application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EOEditingContext in Application


  • Subject: Re: EOEditingContext in Application
  • From: Drew Thoeni <email@hidden>
  • Date: Tue, 1 Jul 2008 08:18:15 -0400

Thanks. This looks like the path I was looking for.

However, in the docs referenced below, it seems to say use something like this in the session:


public NSArray languageList() {
return (NSArray )EOUtilities .objectsWithFetchSpecificationAndBindings( defaultEditingContext(), "Language", "FetchAllAvailableLanguages", null);
}


That code works (I also set the fetchspec in EOModel to "shared", but I'm wanting to make sure I'm actually accomplishing my goal. That is, does the above code still get loaded into session memory? Or, because it is designated as defaultEditingContext and drawn from a "shared" fecthspec, does WO handle this smartly behind the scenes?

I kind of expected the code to be more like this in the application:

	private EOSharedEditingContext sharedEC = new EOSharedEditingContext();

@SuppressWarnings("unchecked")
public NSArray<Language> languageList() {
return (NSArray )EOUtilities.objectsWithFetchSpecificationAndBindings( sharedEC, "Language", "FetchAllAvailableLanguages", null );
}



Regards,

Drew


On Jun 30, 2008, at 11:55 PM, Art Isbell wrote:

On Jun 30, 2008, at 5:25 PM, Drew Thoeni wrote:

So, if I want to make efficient use of memory by storing these rarely changing code table lists in the application, how does one go about storing them in an EC that the sessions can get to?

EOSharedEditingContext. See < http://developer.apple.com/documentation/LegacyTechnologies/WebObjects/WebObjects_4.5/System/Documentation/Developer/WebObjects/DeltaDoc/EOF.html#CBGCHAIA > for restrictions, caveats, etc.


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

_______________________________________________ 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: EOEditingContext in Application
      • From: Lachlan Deck <email@hidden>
    • Re: EOEditingContext in Application
      • From: Art Isbell <email@hidden>
  • Prev by Date: Re: WO 5.4.2 is out
  • Next by Date: Re: WO 5.4.2 is out
  • Previous by thread: Re: WO 5.4.2 is out
  • Next by thread: Re: EOEditingContext in Application
  • Index(es):
    • Date
    • Thread