Say you have a numeric (int
for example) optional column in your DB. If you leave it blank, there will be a NULL in the DB. Now say you subclass NSManagedObject
and use primitive types in your object. That column will be mapped to an int
property. When the object is loaded, what will it put in there? It can't be nil
and it can't be zero.
It's discouraged, not forbidden. Just don't use primitive types in your model objects, which from what you are saying, you wouldn't use in this case anyway if you need to be able to support nils.