Configurations aren't useful here unless either your local and remote to-dos are different entity types or you have other entities that should only exist in one of the persistent store files. When that quote refers to "different entities" they mean different entity types, not different instances of the same entity type.
What's more, you can't use assignObject:toPersistentStore:
to move objects from one persistent store to another one. If you look at the docs for that method you'll see that it only applies to "a newly-inserted object". That means that if you create a new managed object that's not associated with any managed object context (i.e. one where you passed a nil value for the context when creating it), you can then tell NSManagedObjectContext
to insert it into itself and to use a specific store file. Crucially, you cannot use this method on an object that already belongs to a context and a store, so you can't use it to move objects from one store to another.
To move objects as you describe, you'll need to do something like:
- Create a new instance in the target store
- Copy all attributes from the old object to the new one
- Delete the old one and save the new one
There's no built-in support for moving an object from one store to another.