• 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
Re: CoreData: Can't modify an immutable model
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CoreData: Can't modify an immutable model


  • Subject: Re: CoreData: Can't modify an immutable model
  • From: "I. Savant" <email@hidden>
  • Date: Tue, 5 Feb 2008 10:44:02 -0500

> I am trying to create a core data entity using the method
> enittyForName: inManagedObjectContext .  I can create the entity just
> fine but when I try to set one of the attributes I get the following
> error:
>
>   Can't modify an immutable model

  Do you mean you're trying to define a managed object model in code
(versus using XCode's modeler) or you're trying to create an
*instance* of an entity (a managed object) then set its attributes?

  The method+entityForName:inManagedObjectContext: "Returns the entity
with the specified name from the managed object model associated with
the specified managed object context's persistent store coordinator."
This is the entity itself (rather, an NSEntityDescription), not an
instance of it.

  See this document:
  http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/Articles/cdCreateMOs.html

--
I.S.
_______________________________________________

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: CoreData: Can't modify an immutable model
      • From: Chris Schmitt <email@hidden>
References: 
 >CoreData: Can't modify an immutable model (From: Chris Schmitt <email@hidden>)

  • Prev by Date: CoreData: Can't modify an immutable model
  • Next by Date: Re: NSOutlineView and reload
  • Previous by thread: CoreData: Can't modify an immutable model
  • Next by thread: Re: CoreData: Can't modify an immutable model
  • Index(es):
    • Date
    • Thread