Question

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?

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top