They do exactly the same thing, it's just that one allows you to supply a context and the other goes and gets the context for the current thread ([NSManagedObjectContext MR_contextForCurrentThread]
). If you already have the appropriate context then it's more efficient to supply it yourself.
core data difference between findfirstbyattribute and findfirstbyattribute in context
-
11-06-2023 - |
Frage
What's the difference between these two ways of fetching an object in Core Data? Is one more efficient than the other? Do they do the same thing?
MR_findFirstByAttribute:(NSString *) withValue:(id) inContext:(NSManagedObjectContext *)
vs
MR_findFirstByAttribute:(NSString *) withValue:(id)
Lösung
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow