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

Programmatically providing default value for new core data attribute?


  • Subject: Programmatically providing default value for new core data attribute?
  • From: Rick Mann <email@hidden>
  • Date: Wed, 31 Oct 2012 02:44:09 -0700

Hi. I've added a simple attribute to my model that should be a concatenation of a handful of other attributes, run through some code. I don't suppose there's any way to do the lightweight migration but tell it, "here's a method to call to get the default value of this property?"

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.

Given that, I can let lightweight migration do its thing, then post-process it, but I don't see a way to determine that lightweight migration ran when I opened the store.

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

Thanks,

--
Rick




_______________________________________________

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

  • Follow-Ups:
    • Re: Programmatically providing default value for new core data attribute?
      • From: Jerry Krinock <email@hidden>
    • Re: Programmatically providing default value for new core data attribute?
      • From: Dave Fernandes <email@hidden>
  • Prev by Date: Re: createDirectoryAtPath:withIntermediateDirectories:attributes:error: Returns NO when it exists
  • Next by Date: printing Utf8
  • Previous by thread: Re: Event loop expiration date insight
  • Next by thread: Re: Programmatically providing default value for new core data attribute?
  • Index(es):
    • Date
    • Thread