A solution is to have 2 persistentStoreCoordinators and 2
managedObjectContexts, with the Coordinators each having one single
persistent store.
It is clear that there can be no reassignment problems anymore.
However, I don't understand why this seems to be required; that is, why
can't I have two m
>>It might also be worth putting a test in awakeFromInsert -- first
>>check if the object has been assigned to a persistent store, and only
>>assign if it has not.>Done that; it doesn't get called more than once, and it
>>doesn't help to do >the assignObject: toPersistentStore: outside the
>
> All right, but that does not cover the case of an object being added > using
> the 'add' button linked to the array controller (which btw is > bound to the
> correct managedObjectContext). Then you end up directly > in
> awakeFromInsert, which at least should be OK if it is executed > onl
On Nov 16, 2008, at 13:30, Arthur C. wrote:
The example in the documentation:> http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/Articles/cdCreateMOs.html#/
>/apple_ref/doc/uid/TP40001654-SW2>>does the assignment immediately
after the >"insertNewObjectForEntityForName" call
From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: Core data save error with multiple
persistent storesDate: Sun, 16 Nov 2008 21:02:37 +0100
In my application I have two managed object contexts, as I need to be able to
save two subsets of my Core Data setup separately. These are both using one and
On Nov 16, 2008, at 12:02, Arthur C. wrote:
I take care that every object instance gets inserted into the right
managedObjectContext, by using [NSEntityDescription
insertNewObjectForEntityForName: ...]. And it gets assigned to the
right persistent store by using
- (void) awakeFromInsert
{
In my application I have two managed object contexts, as I need to be able to
save two subsets of my Core Data setup separately.
These are both using one and the same persistent store coordinator; the
coordinator has two stores.
I take care that every object instance gets inserted into the r