• 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
Using NSFetchRequest to fetch NSManagedObject subclasses
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Using NSFetchRequest to fetch NSManagedObject subclasses
      • From: Roland King <email@hidden>
  • Prev by Date: Re: Custom control and cells
  • Next by Date: Re: Using NSFetchRequest to fetch NSManagedObject subclasses
  • Previous by thread: [iOS] How to test iAd enabled apps
  • Next by thread: Re: Using NSFetchRequest to fetch NSManagedObject subclasses
  • Index(es):
    • Date
    • Thread