I am doing the migration in readFromURL:ofType:error: I call: migrationManager withmigrateStoreFromURL: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 don't really understand copying the store file and them migrating.
I call [self setFileURL:[NSURL fileURLWithPath:storeFilePath]];[self setFileModificationDate:[[fileManager fileAttributesAtPath:storeFilePath traverseLink:YES] fileModificationDate]]; and this changes the dialog message from "...changed by another app..." to "...has been moved..."
A little more info, this is 10.5 only and currently xml stores. Thanks, Dan On Feb 4, 2009, at 4:14 PM, sanchezm wrote:
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 setFileModificationDate as suggested and I only get a slightly better but still confusing message as above.so where are you doing the migration?If you're moving the document during your manual migration, I might suggest copying it and then migrating over the original copy.- MiguelI have tried FSExchangeObjects but that did not help.I have not tried moving the migration code to a -writeToURL: or - saveToURL: method and calling that if I need to migrate, surely there is a less convoluted way.Any help will be greatly appreciated. Dan On Feb 4, 2009, at 12:42 PM, Barry Wark wrote: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 <d...@marware.com> wrote: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 anotherapplication since you opened or saved it."What is the correct procedure for handling the file change or how can Iavoid this message? Thanks, Dan_______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/sanchezm95%40gmail.com This email sent to sanchez...@gmail.com
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com