• 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: Programmatically providing default value for new core data attribute?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Programmatically providing default value for new core data attribute?


  • Subject: Re: Programmatically providing default value for new core data attribute?
  • From: Jerry Krinock <email@hidden>
  • Date: Wed, 31 Oct 2012 20:16:11 -0700

On 2012 Oct 31, at 02:44, Rick Mann <email@hidden> wrote:

> Will -isConfiguration:compatibleWithStoreMetadata: tell me a lightweight migration-capable change is incompatible?

I think all it does is compare UUIDs or hashes, so the answer is "no".

> I looked at doing a mapping model, but even that just has me build the value in there; no apparent way to run it through my code.  Any suggestions?

You put this code in a subclass of NSMigrationPolicy.  It is not difficult, and a useful thing to learn.  I prefer non-lightweight migration, because migrating users' data is risky.  When I write the expressions and/or code myself, I can understand, probe, and test it fully.



_______________________________________________

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: 
 >Programmatically providing default value for new core data attribute? (From: Rick Mann <email@hidden>)

  • Prev by Date: Re: Drawing customized window
  • Next by Date: Getting rid of primitive accessor warnings
  • Previous by thread: Re: Programmatically providing default value for new core data attribute?
  • Next by thread: printing Utf8
  • Index(es):
    • Date
    • Thread