• 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
Re: Concerns about changing NSManagedObjectContext
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Concerns about changing NSManagedObjectContext


  • Subject: Re: Concerns about changing NSManagedObjectContext
  • From: "Marcus S. Zarra" <email@hidden>
  • Date: Tue, 19 Jun 2007 18:23:11 -0600

In the google maccode project (http://code.google.com/p/maccode/)
there is some example code that shows how to do a schema migration.
You can use that code to build your schema versioning for your
particular application.  It is not a 100% drop in solution (in fact I
am still working on optimizing it more) but it will get you a long
ways towards what you are looking to do.

From experience it is a VERY good idea to have this in place before
you launch your application.  Murphy always seems to raise his head
right after an initial launch and require a schema migration :)

Marcus S. Zarra
Zarra Studios LLC
Simply Elegant Software for OS X
www.zarrastudios.com

On 6/19/07, Jim Thomason <email@hidden> wrote:
>
> There are only three differences between a Core Data document based
> application, and the non-document style.


Okay, I went back and re-evaluated the effort and it wasn't too difficult to migrate the whole ball of wax over to a document based app. Nice.

But now I have another issue. The old coredata based app of course used a
single central file down in Library/Application Support/ and now the user
will be able to use any file they want. As part of the migration, I want to
automatically upgrade the central file to something document based. It's
easy enough to open up the file on first launch of the upgraded version and
present an alert to the user saying that the app is now document based.


Ideally, I would then like to require the user to save the file into a different location of their choosing. I don't want to leave one doc hanging around in the application support file where they can lose it if all other docs would be in user specified locations. Basically, I want to create a new unsaved file populated with all of the data from the existing file.

Is there any way to accomplish this?

-Jim....
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


References: 
 >re: Concerns about changing NSManagedObjectContext (From: Ben Trumbull <email@hidden>)
 >Re: Concerns about changing NSManagedObjectContext (From: "Jim Thomason" <email@hidden>)

  • Prev by Date: Re: Expanding all rows of an outline view
  • Next by Date: Re: Expanding all rows of an outline view
  • Previous by thread: Re: Concerns about changing NSManagedObjectContext
  • Next by thread: Core Data File Sharing via an AFP Alias
  • Index(es):
    • Date
    • Thread