Re: Warning: critical Core Data documentation flaw
Re: Warning: critical Core Data documentation flaw
- Subject: Re: Warning: critical Core Data documentation flaw
- From: mmalcolm crawford <email@hidden>
- Date: Mon, 13 Jun 2005 08:52:27 -0700
On Jun 13, 2005, at 8:43 AM, Larry Gerndt wrote:
Here's what happened to me: I started following the
NSPersistentDocument tutorial. In the section "Create the Data
Model", it provides a link to "Creating a Managed Object Model
using XCode", which I followed. There it has you create the
Entities "Department" and "Employee" and assign their classes as
"Department" and "Employee". It never mentions there that those
classes must be defined in your project by creating a subclass of
NSManagedObject. Don't you think it should mention that?
No, because at that stage on the tutorial you should not. In fact
the instructions state that you should not (see (1)).
The "Create the Data Model" tutorial explicitly points out the effect
of setting the class name for the entities:
<http://developer.apple.com/documentation/Cocoa/Conceptual/
DataModeling/Tasks/modelCreationTask.html#//apple_ref/doc/uid/
TP30001197-171489>
"You have now defined two entities—Employee and Department—***and
importantly you have specified that in your application these
entities are represented by the Employee and Department classes
respectively.***"
Having read that, I went back to the NSPersistentDocument tutorial
and followed the steps for "Create the Data Model", except I
(wrongly) changed the class of "Department" and "Employee" to
"Department" and "Employee". The tutorial does not say to do this,
So you did something not only not in the NSPersistentDocument
tutorial, but actually *counter* to the tutorial's instructions:
<http://developer.apple.com/documentation/Cocoa/Conceptual/
NSPersistentDocumentTutorial/02_CreatingProj/
chapter_3_section_3.html#//apple_ref/doc/uid/TP40001799-CH203-
DontLinkElementID_10>
(1) "Items of note and not covered in the tables:
The class for both entities is NSManagedObject; neither entity is
abstract."
In other words, the NSPersistentDocument tutorial states explicitly
that you should not set custom classes for the entities at this stage.
mmalc
_______________________________________________
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