One of my current core data entities - Entity1 - has a Boolean
attribute called isSaved
.
In the new core data model, I am planning to remove isSaved
attribute and add a new Int
attribute called type
. And for all saved Entity1 objects, I'd like to set the value of type
according to the value of isSaved
in old core data model. (e.g. if isSaved is true, then type is 1, else type is 2).
I've read some articles about light weight core data migration, but none of them seems helpful.
Just wondering if there is any way that can make my planned migration work?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…