re: Creating NSMappingModel programmatically
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