• 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: Fetching from related object
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fetching from related object


  • Subject: Re: Fetching from related object
  • From: Randall Perry <email@hidden>
  • Date: Sun, 25 Apr 2004 15:43:23 -0400

Got this to work by adding this to the custInfo fetch:
     custFetchSpec.setPrefetchingRelationshipKeyPaths(new NSArray("Log"));

>> So, you fetch a CustInfo as above.  Now, how do you get the Log objects
>> associated with it?  The easiest best performing way is to do
>> NSArray arrayOfLog = (NSArray)custInfo.valueForKey("logEntries");
>>
>
> Tried the code above:
>   logInfo = (NSArray)custInfo.valueForKey("Log");
>
> It runs ok but returns an empty array.
>
> Checked the db and the cust I was using had 17 related log records.
>
> With the help of the docs and this list I've discovered at least 3 methods of
> doing what I want...unfortunately I'm 0 for 3. Drat!-(


--
Randall Perry
sysTame

Xserve Web Hosting/Co-location
Website Development/Promotion
Mac Consulting/Sales

http://www.systame.com/
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Fetching from related object
      • From: Chuck Hill <email@hidden>
References: 
 >Re: Fetching from related object (From: Arturo PĂ©rez <email@hidden>)

  • Prev by Date: Re: Fetching from related object
  • Next by Date: Re: Fetching from related object
  • Previous by thread: Re: Fetching from related object
  • Next by thread: Re: Fetching from related object
  • Index(es):
    • Date
    • Thread