I have a class, which describe an object for parsing XML. This class contains NSStrings and NSMutableArrays of NSStrings.I want to store parsed data using CoreData. How should I write CoreData model to store such objects if there is no such data type like NSMutableArray? Is there any way?
Share
You can create two entities, I’ll call them
ArrayandString.Arrayhas one relationship,strings, which is a one-to-many relationship with theStringentity. TheStringentity then has one attribute, I’ll call itstringtoo, which actually is a string and contains the value you need. This will allow you to store them as a set, if the order is important add another attribute to theStringentity calledorderand make it a number.