objectWithFieldNAme Best Practice for CoreData

Posted by Rafael on Stack Overflow See other posts from Stack Overflow or by Rafael
Published on 2010-06-18T09:56:46Z Indexed on 2010/06/18 10:03 UTC
Read the original article Hit count: 268

Hello,

I'm trying to implements some methods for my CoreData models and I'm wonndering if the way I'm doing it is a good practice. I want to implement methods of the type getObjectsWithFieldName. This methods could be used by severals views. So the way I'm doing it is implementing a Class method in the model in the following way:

+(NSArray *)getObjectWithFieldName:(NSString *)fieldName andContext:(NSManagedObjectContext *) context;

Is this a good practice? Or there is another way to do it for iPhone Development?

Thanks in advanced.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about objective-c