• 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: Creating NSMappingModel programmatically
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

re: Creating NSMappingModel programmatically


  • Subject: re: Creating NSMappingModel programmatically
  • From: Ben Trumbull <email@hidden>
  • Date: Mon, 29 Mar 2010 14:40:41 -0700

> 'm trying to create an NSMappingModel manually between two models, but it's not working in that no data gets migrated over (I checked with an SQLite database browser) to the new store, the tables are just empty.
>
> The source model has one entity Person with two attributes: name and eyeColor.
>
> The destination model also has only one entity Person with two attributes: name and address.
>
> Thus, name should get transferred over, eyeColor get deleted, and address added as a new attribute.

Try creating the same mapping model in the Xcode tool, and then load it programmatically and compare it to the one you constructed by hand.  Iterating over the tool created one should high light whatever property mappings you are missing in your hand crafted one.

- Ben



_______________________________________________

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

  • Prev by Date: Re: NSTableView ignores changes to cell's objectValue outside mouse tracking methods?
  • Next by Date: Re: Core Data doesn't save toMany relations please HELP :S
  • Previous by thread: RE: Creating NSMappingModel programmatically
  • Next by thread: Accessing Regional iVars: Best Design Method
  • Index(es):
    • Date
    • Thread