Reputation: 11749
With Core Data Fetched Properties, how do I perform this simple request:
I want the Fetched Property (myFetchProp
) to be on store StoreA
, and it should do:
[myFetchProp getMeRecordWithPredicate:@“X == 35” inEntity:@“entityH” fromStore:StoreB];
Forgive my wrong-syntax, but I suppose my point is easy to understand.
I can’t find any simple and clear example on the net. I presume that should not be so difficult.
Upvotes: 1
Views: 3253
Reputation: 12670
Since I have just read Marcus S. Zarra's Core Data: Data Storage and Management for iOS, OS X, and iCloud (2nd edition) (see here and here) let me quote it on the topic:
In practice, I have found fetched properties to be less useful and less flexible than either creating a stored fetch request or building the fetch request in code. Usually when a situation calls for a fetched property, it tends to be easier to subclass the entity in question, perform an
NSFetchRequest
in code, and return the results.
So the assumption that fetched properties can be simple may be wrong.
Upvotes: 1