• 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
Configurations in Core Data
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Configurations in Core Data


  • Subject: Configurations in Core Data
  • From: Drew Mccormack <email@hidden>
  • Date: Mon, 13 Nov 2006 17:23:08 +0100

I have an app with an in-memory store, and an XML file store. In the past, I have been using assignObject:toPersistentStore: to ensure that each NSManagedObject ended up in the correct store. This worked fine, but I thought configurations would be a neater solution, so now I am trying to get that to work. I have introduced two configurations, one for the in memory entities, and one for the on file ones.

Since I made this change, I have started getting this error when saving:

Can't reassign an object to a different store once it has been saved.

I create all my entity instances either with insertNewObjectForEntityForName:inManagedObjectContext:, or in a array controller bound to the managed object context, so I don't know why I would get this error. I have also searched for assignObject:toPersistentStore: calls, just in case I forgot one, but there aren't any.

The only thing I can think is that it has to do with a cross-store relationship that exists, but both ends of the relationship are marked as transient, so I shouldn't think it would be a problem.

Any ideas?

Drew

---------------------------------------------------------
Drew McCormack

www.macanics.net
www.macresearch.org


_______________________________________________ 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
  • Prev by Date: Re: Is it possible to figure out if "File Vault" is in use?
  • Next by Date: Opening a closed window
  • Previous by thread: NSDrawerFrame, NSDrawerWindow and transparency
  • Next by thread: Opening a closed window
  • Index(es):
    • Date
    • Thread