Valentin Shamardin
Valentin Shamardin

Reputation: 3658

Can I set transient properties to fetch?

I want to create NSFetchRequest and set properties to fetch like this:

request.propertiesToFetch = @[@"a", @"b", @"c"];

where a and b are stored in Core Data database, and c is transient. executeFetchRequest: fires an error Invalid keypath c passed to setPropertiesToFetch:. But if I uncheck transient-checkbox for property c everything will work fine. So is it really impossible to fetch transient properties or I'm doing something wrong?

Upvotes: 7

Views: 1054

Answers (1)

Wain
Wain

Reputation: 119031

Yes, it is really impossible. You can't fetch them because they don't exist in the persistent store - that's what it means to be transient. You can fetch whatever persistent attributes the derived, transient, attribute is created from.

Upvotes: 9

Related Questions