Re: ADC Core Data article
Re: ADC Core Data article
- Subject: Re: ADC Core Data article
- From: "John C. Randolph" <email@hidden>
- Date: Tue, 5 Apr 2005 17:55:31 -0700
On Apr 5, 2005, at 5:18 PM, Dustin Voss wrote:
On 5 Apr, 2005, at 4:14 PM, Scott Stevenson wrote:
On Apr 5, 2005, at 2:49 PM, Philip Mötteli wrote:
Each entity definition in a managed object model requires the
name of the entity and the name of the class used at runtime to
represent that entity. By default, the class used is
NSManagedObject, but the class may be either NSManagedObject or
a subclass thereof.
I read that phrase 5 times. Is that really true? Only subclasses
of NSManagedObject get managed persistency from Core Data?
Trying to implement transparent persistence without a persistent
subclass is.... challenging.
I imagine Philip was thinking that persistence would be integrated
into NSObject, like Key-Value Coding. But personally, I prefer
having a distinct super-class that I can drop in-place of NSObject.
NSObject is overburdened as it is.
The reason that NSManagedObject is distinct from NSObject, is that
there are many situations where persistence isn't needed or wanted.
You should derive your model objects from NSManagedObject, not every
object in your apps.
-jcr
John C. Randolph <email@hidden> (408) 974-8819
Sr. Cocoa Software Engineer,
Apple Worldwide Developer Relations
http://developer.apple.com/cocoa/index.html
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden