Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fetch complete objects (not faults) from CoreData?

I'm new to CoreData concept, and may be I'm getting something wrongly, but I want to fetch fully-qualified array of data from CoreData (not these abstract faults).

My problem is that I displaying a list of objects from CoreData to user in UITableView and at the same time refreshing data in background thread. If user is scrolling TableView at the same time as some of objects were deleted/changed I'm getting CoreData could not fulfill a fault exception

Thanks

like image 767
Burjua Avatar asked Oct 08 '10 09:10

Burjua


1 Answers

Ok, it is actually easy, need to set request's property ReturnsObjectsAsFaults to NO

like this:

[request setReturnsObjectsAsFaults:NO];

I'ts strange nobody answered this simple question

like image 150
Burjua Avatar answered Oct 13 '22 00:10

Burjua