How to programaticly access min and Max values defined in a core-data model designed with XCode ?

Posted by Xav on Stack Overflow See other posts from Stack Overflow or by Xav
Published on 2010-06-16T17:37:52Z Indexed on 2010/06/16 21:12 UTC
Read the original article Hit count: 176

Filed under:
|

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...

© Stack Overflow or respective owner

Related posts about iphone-sdk

Related posts about core-data