How to programaticly access min and Max values defined in a core-data model designed with XCode ?
- by Xav
I was expecting to find that in the NSAttributeDescription class, but only the default value is there.
Behind the scene I tought a validationPredicate was created but trying to reach it using
NSDictionary* dico= [[myManagedObject entity] propertiesByName];
NSAttributeDescription* attributeDescription=[dico objectForKey:attributeKey];
for (NSString* string in [attributeDescription validationWarnings])
just get me nowhere, no validationWarnings, no validationPredicates...
any thoughts on this ?
Edit1: It seems that getting the entity straight from the managedObject doesn't give you the full picture. Getting the Entity from the NSManagedObjectModel permits to reach the validationWarnings & validationPredicates...