Re: Adding to-many objects programmatically
Re: Adding to-many objects programmatically
- Subject: Re: Adding to-many objects programmatically
- From: Roland King <email@hidden>
- Date: Sat, 16 Jan 2010 16:17:27 +0800
Cast to the actual type before calling the method.
Instead of [ managedObject method1 ]
do
[ (Employee*)managedObject method1 ]
On 16-Jan-2010, at 14:57, Jenny M <email@hidden> wrote:
When I tried to use the getter/setter, I get a build warning that says
the NSManagedObject may not respond to that method. I noticed in the
documentation, they're referring to the entities themselves - Employee
and Department. I don't use custom classes, just the data model, so
I've been referring to them as NSManagedObjects the whole time,
though... how would I refer to them by their names?
The objects do load, I ran the program regardless of warnings and it
did set the categories and references. So, how would I get it to build
without those warnings?
On Jan 15, 10:13 pm, mmalc Crawford <email@hidden> wrote:
"Core Data automatically generates efficient public and primitive
get and setaccessor methods for modeled properties (attributes and
relationships) of managed object classes (see “Managed Object Acce
ssor Methods”). When you access or modify properties of a managed
object, you should use these methods directly."
_______________________________________________
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
_______________________________________________
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