• 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: core data stores, versioning
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: core data stores, versioning


  • Subject: Re: core data stores, versioning
  • From: Jerry Krinock <email@hidden>
  • Date: Sun, 02 Sep 2012 18:55:14 -0700

On 2012 Sep 01, at 04:20, Martin Hewitson <email@hidden> wrote:

> 1) Can one determine the version of a model from it's core data store file (XML) ?
> 2) Can one determine the corresponding version number of the models in Xcode ?

If I remember correctly, models are identified by UUIDs.  The normal method is to iterate through all the available models you have until you find one for which -[NSManagedObjectModel isConfiguration: compatibleWithStoreMetadata:].  You might learn something from here…

https://github.com/jerrykrinock/ClassesObjC/blob/master/SSYPersistentDocumentMultiMigrator.m

I think that the UUID itself is in the store's metadata, which you can learn how to dig into here…

https://github.com/jerrykrinock/CategoriesObjC/blob/master/NSPersistentDocument+SSYMetadata.m

> 3) Can one somehow reconstruct (if even by hand) a core data model from a store file?

It may be different with an XML store, but with an sqlite store, you could look at the tables in the store.  Tables correspond to entities, etc.  A GUI tool like SQLIteManager is handy.



_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden


References: 
 >core data stores, versioning (From: Martin Hewitson <email@hidden>)

  • Prev by Date: Re: Code Signing for Mountain Lion
  • Next by Date: Create custom NSTableView with a button inside
  • Previous by thread: core data stores, versioning
  • Next by thread: Re: How to insert a "screen-only" character in an NSTextView?
  • Index(es):
    • Date
    • Thread