Search code examples
ioscore-dataxcode4compiler-warningsdatamodel

Can I ignore Cora Data warning regarding too many attributes?


I'm using Core Data (with sqlite) in an iOS app and currently adding some new attributes to an entity. I'm up to around 110 attributes. I realise this is a lot, but when I tried to organise the data in a different way I found it impossible to keep my app working reliably.

Xcode is now giving me a warning: "Misconfigured Entity: Entity has more than 100 properties; consider a more shallow entity hierarchy or denormalized properties."

I don't know what it means by denormalized properties, but let's say I'm keen to keep my data model the way it is. I never normally ship code that has any warnings of any sort. But can I safely ignore this warning, at least for the time being until I work out a better way to structure my data?


Solution

  • You should move the Category to a separate entity, that would consist of title, skill level, date and notes. That is the right way, and it will move out all the warnings. You pupils will have one-to-many relationship with the category—one pupil could be in many categories—that's it.