I got a log object retrieved by NSFetchedResultsController, it has an optional attribute that’s an slide object. And it’s currently faulted. So if I log log.slide, it will return a faulted object. How do I check if log actually have a slide object attached to it? I want to be able to use if(log.slide){...}
I tried to set the NSFetchRequest to [request setReturnsObjectsAsFaults:NO]; before hand it to NSFetchedResultsController. But it’s still returning faulted objects. Thanks!
A fault is automatically fulfilled when you access it, so you can simply use your example
if (log.slide) {...}and it will work like you expect it to, fulfilling the fault if necessary.