It seems that the comments worked out the answer, but I'm not sure that everything is clear.
A query query returns an array of results. Typically, the objects representing the results will be the class specified in the model. If you subclass NSManagedObject (as it should be), it will be a subclass. If not, it will be a generic NSManagedObject whose properties you get through valueForKey:
However, you can request that the results be returned as dictionaries. This does not mean that the executeFetchRequest:error: method returns a dictionary. Rather, it means that every object in the array will be a dictionary.
In what format you get the results, you need to pull out the object (s) that you need from the array. A common idiom is simply to add .lastObject or .firstObject to the end of the executeFetchRequest:error: call. Sort of:
MyObject *object = [context executeFetchRequest:request error:NULL].firstObject;
A magic record is nothing more than a fancy wrapper around Core Data classes. It provides convenient methods, but all the usual semantics of Core Data are still preserved.
source share