Re: Fetching from related object
Re: Fetching from related object
- Subject: Re: Fetching from related object
- From: Chuck Hill <email@hidden>
- Date: Sun, 25 Apr 2004 12:39:03 -0700
Close only counts in horse shoes and hand grenades.
logInfo = (NSArray)custInfo.valueForKey("logEntries");
The part in quotes is the name of the relationship in the CustInfo entity,
NOT the name of the related entity.
Chuck
At 03:26 PM 25/04/2004 -0400, Randall Perry wrote:
>> 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.
>
>
--
Chuck Hill email@hidden
Global Village Consulting Inc. http://www.global-village.net
_______________________________________________
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.