开发者

Which kind of changes can't I do with lightweight migration in Core Data?

开发者 https://www.devze.com 2023-01-03 04:09 出处:网络
I recently tried a lot of different stuff with lightweight migration. These all work: 1) Rename attributes (with renaming identifier specified)

I recently tried a lot of different stuff with lightweight migration. These all work:

1) Rename attributes (with renaming identifier specified)

2) Add attributes

3) Add new entity + new attribute + inverse relationship to an already existing entity

4) remove existing entit开发者_如何学运维y + relationships to that entity


= It almost looks like just about anything can be handled with LM. Did I miss something? In which cases am I getting into trouble and need an some more complex approach?


Splitting one entity into two different entities (Person > Child & Adult) will not work with automatic migration.

Applying logic (renaming a parameter based on a condition of another parameter) will not work.

Most of your basic migrations can be handled by automatic. Dealing with logic decisions requires a mapping model or custom migration code.

0

精彩评论

暂无评论...
验证码 换一张
取 消