Using NSFetchRequest to fetch NSManagedObject subclasses
Using NSFetchRequest to fetch NSManagedObject subclasses
- Subject: Using NSFetchRequest to fetch NSManagedObject subclasses
- From: Matt James <email@hidden>
- Date: Sat, 10 Jul 2010 00:29:30 -0400
Hi all,
In the WWDC session "Mastering Core Data", it was recommended to subclass NSManagedObject, which I'm doing. Not only does this follow their recommendation, but it's also helpful for coding additional logic that might be appropriate on a per-model basis. What I don't understand, however, is how to fetch those subclassed objects from the managed object context.
As an example, let's say I have PersonModel which extends NSManagedObject and, for me, represents a "Person" entity. When I run a fetch for Person entities, I get back NSManagedObjects. That's fine, but I'm unable to make use of any custom logic I have on the PersonModel class.
I'm new to Core Data, so I may very well be misunderstanding the recommendations or be doing things in a screwy manner. Please straighten me out!
Thanks for any help.
-Matt James
http://www.macyenta.com_______________________________________________
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