On Feb 23, 2009, at 6:37 AM, Jon C. Munson II wrote:

When the -insert method is called, Core Data creates an instance of a new
object for an entity and returns a pointer to that object. [...]

This is described in the documentation:
<http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/Articles/cdCreateMOs.html >

By calling -setValue:forKey: one can then fill in the data values for the required
attributes.

The documentation makes clear that you should typically *not* use key- value coding to set managed objects' attribute values: <http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/Articles/cdUsingMOs.html#//apple_ref/doc/uid/TP40001803 >

This is different from using default values for attributes as
set by either the data model or via equivalent code. Those default values
will be automatically populated when the object is created.

<http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/Articles/cdManagedObjects.html#//apple_ref/doc/uid/TP40003397-SW2 >

mmalc

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to