0

An example of my data model version 1 looks like this: enter image description here

The cake is eaten by some guests.

In data model version 2 not every guest will eat the same amount of pieces. I want to assign each guest an individual number of pieces: enter image description here

(numberOfPieces could be set to a default of 1 pieces.)

How can that be accomplished? I've implemented a custom mapping model and set a custom policy for the mapping CakeToCake. However, I'm unsure what to do. Does my policy have to implement createRelationshipsForDestinationInstance:entityMapping:manager:error: where I would manually create the PieceOfCake object?

Norbert
  • 4,239
  • 7
  • 37
  • 59
  • possible duplicate of [Migrating a many-to-many relationship to a join table in Core Data](http://stackoverflow.com/questions/11174773/migrating-a-many-to-many-relationship-to-a-join-table-in-core-data) – Wain May 10 '14 at 13:44

1 Answers1

0

I think I did the right thing and finally created PieceOfCake in createRelationshipsForDestinationInstance:entityMapping:manager:error:. It works well.

Norbert
  • 4,239
  • 7
  • 37
  • 59