• 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: Memory Management
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Memory Management


  • Subject: Re: Memory Management
  • From: Jeff Schmitz <email@hidden>
  • Date: Fri, 06 Mar 2009 21:55:36 -0600


On Mar 6, 2009, at 7:05 PM, Chuck Hill wrote:

That is _batch_ fetching, not _pre_fetching. They do similar things, but prefetching is easier to use for most cases.

I'm working on the prefetching and was wondering, is there any way to prefetch several "layers" of relationships into the editing context all in one call? Or can you only go down one layer at a time?


Here's what I've come up with to prefetch all the entries in a pool, but I would like to be able to specify that all those entries Games also be pre-fetched (and so on):

public static Pool fetchPoolWithNameAndPrefetchEntries(EOEditingContext ec, String name, byte poolType) {

EOQualifier poolQual = Pool.POOL_TYPE.eq(poolType).and(
Pool.NAME.likeInsensitive(name));
ERXFetchSpecification poolFetch = new ERXFetchSpecification(_Pool.ENTITY_NAME, poolQual, null);
NSArray <String> keyPaths = new NSArray(new String[] {Pool.ENTRIES_KEY});
poolFetch.setPrefetchingRelationshipKeyPaths(keyPaths);
return (Pool) ec.objectsWithFetchSpecification(poolFetch).lastObject();
}


_______________________________________________
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: Memory Management
      • From: Jeff Schmitz <email@hidden>
References: 
 >Re: Memory Management (From: Jeff Schmitz <email@hidden>)
 >Re: Memory Management (From: Andrew Lindesay <email@hidden>)
 >Re: Memory Management (From: Jeff Schmitz <email@hidden>)
 >Re: Memory Management (From: Andrew Lindesay <email@hidden>)
 >Re: Memory Management (From: Jeff Schmitz <email@hidden>)
 >Re: Memory Management (From: Chuck Hill <email@hidden>)
 >Re: Memory Management (From: Jeff Schmitz <email@hidden>)
 >Re: Memory Management (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: Memory Management
  • Next by Date: Re: Memory Management
  • Previous by thread: Re: Memory Management
  • Next by thread: Re: Memory Management
  • Index(es):
    • Date
    • Thread