This may seem stupid, but I still couldn't figure out how to mark a attribute as a primary key in the xcdatamodel file.
My persistent storage is sqlite file.
Can anyone help me?
In that case, how can I "validate" a ID to be unique?
Should I write a validation method or something?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…