Question on manual Core Data migration by the code

Hi,

I currently experiment migration by the code. Just for understand what happened under the hood.

It's OK for attributes. But not for relationships.

Here is my code:

Code Block swift
let property = NSPropertyMapping()
property.name = "list"
property.valueExpression = NSExpression(format: """
FUNCTION($manager, "destinationInstancesForEntityMappingNamed:sourceInstances:" , "ItemV1ToItemV2", $source.list)
""")
item.relationshipMappings = [property]


Thank you for your help 😁
Answered by morininnovation in 629767022
Found the solution myself.

sourceEntityVersionHash and destinationEntityVersionHash are required on NSEntityMapping.
Accepted Answer
Found the solution myself.

sourceEntityVersionHash and destinationEntityVersionHash are required on NSEntityMapping.
Question on manual Core Data migration by the code
 
 
Q