views:

165

answers:

1

If i fetch data from "parent" and assign it to a fetchresultscontroller, i still have to call

[parent.images allObjects]

in my cellForRowAtIndexPath to get to the child data. Is this a normal thing to do or can i get the real data from child right in my fetchedresultscontroller?

A: 

You can call

[fetchRequest setRelationshipKeyPathsForPrefetching:@"children"]

Before executing your fetch request to include values for "children" key as well. By default, all relationships will be faulted.

Diederik Hoogenboom
Oke thanks, i am using that line of code now, but when i nslog my fetchedresultscontroller i get this:this is one line from my output i omitted the restimages = ( 0x123ee10 <x-coredata://ACFFBS74-2A1B-4356-B21A-C327CAC45245/Images/p4>
Ton
These are the NSManagedObjects of the relationship "images". Reading attributes (like the attribute the image is stored in) from the images managed objects should show give you the result immediately.
Diederik Hoogenboom