Re: CoreData migration and file change

2009-02-05 Thread Dave Fernandes
I do migration in a subclass of NSDocumentController in the openDocumentWithContentsOfURL:display:error: method. Works great, but I've only tested on 10.4 so far. You migrate the store and then call [super openDocumentWithContentsOfURL...]. Dave On Feb 5, 2009, at 9:56 AM, Dan Grassi wrote

Re: CoreData migration and file change

2009-02-05 Thread Dan Grassi
I am doing the migration in readFromURL:ofType:error: I call: migrationManager with migrateStoreFromURL:type:options:withMappingModel:toDestinationURL:destinationType:destinationOptions:error : Thus I get a new file on the migration, that seems to be the crux of the problem. So I

Re: CoreData migration and file change

2009-02-04 Thread sanchezm
On Feb 4, 2009, at 12:25 PM, Dan Grassi wrote: After having read everything I can google I have only progressed to: "The document “project.xml” has been moved." I am doing a manual migration so I do not call configurePersistentStore:... as Miguel suggests but have tried setFileModificatio

Re: CoreData migration and file change

2009-02-04 Thread Dan Grassi
After having read everything I can google I have only progressed to: "The document “project.xml” has been moved." I am doing a manual migration so I do not call configurePersistentStore:... as Miguel suggests but have tried setFileModificationDate as suggested and I only get a slightly bette

Re: CoreData migration and file change

2009-02-04 Thread Barry Wark
I recently asked a related question on StackOverflow: http://stackoverflow.com/questions/380076/manual-core-data-schema-migration-without-document-changed-warning. The answer should help you out. On Tue, Feb 3, 2009 at 9:08 AM, Dan Grassi wrote: > I have a CoreData application and am migrating th

re: CoreData migration and file change

2009-02-03 Thread Ben Trumbull
I have a CoreData application and am migrating the data store. When the user opens an old store the migration happens automatically creating a new file. The problem is when the user saves the first time after the migration he gets the message: "This document’s file has been changed by another ap