I'm new to Core Data, and I was wondering if I can get some recommendations on how to best lay out the following scenario with Core Data:
I have a patient object (and its corresponding subclass NSManagedObject). Each patient may have various diseases. Each disease is its own essence and controlled object. In my patient class, I want to have an array filled with diseases for this patient. However, Core Data does not allow you to store NSArray as an attribute.
What would be the best way to organize this in Core Data?
I thought of some options:
Use portable attribute in Patient object and store array in this? Doesn't seem very clean though
Using an intermediate Controller object between a patient and diseases that can mimic some array functions
I donβt know if this is possible, but perhaps to sample and get only those diseases that are associated with a particular patient?
Thanks for the help!
Christian r
source share