Re: CoreData Relationships and Array Controllers
Re: CoreData Relationships and Array Controllers
- Subject: Re: CoreData Relationships and Array Controllers
- From: Quincey Morris <email@hidden>
- Date: Tue, 04 Oct 2011 18:57:06 -0700
On Oct 4, 2011, at 01:49 , Amy Gibbs wrote:
> If anyone could point me in the direction of a good fetching explanation or tutorial that would be great.
I don't know of a good reference for you. Googling is as likely as not to turn something up. I'd also suggest you try reading about fetches in the Core Data reference. It may contain more detail than you're ready to absorb, but it may help.
I think I would approach the problem like this:
First, see if you can use an array controller to display all the order items from every order from every customer. I'm not sure offhand, but I think that just involves setting (in the array controller in IB) the correct entity type for the order items, supplying a managed object context, and setting "prepares content automatically" to YES.
If you can do that, you should be able to add a fetch predicate to that array controller, which selects just the customer you want. This is likely to be fiddly rather than hard.
Those two things together should give you the list you want, and then you can use the related product information as detail, either in the list or in a separate detail view.
I know it's no help to say so, but it's true that using Core Data is an advanced topic. If you want to use the technology, you may be forced to get a bit more technical that you had otherwise intended.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden