Post

Replies

Boosts

Views

Activity

CoreData context save with large number of items fails
The same code for 100 items works, but fails with exception for 600 with the Error Domain=NSCocoaErrorDomain Code=1570 \"title is a required value.\" ... all other properties of the objects are reported as nil as well. The objects are setup on the same thread and are valid before context.save is called. As I said before, it works for 100 items but fails for 600.      let users = DataLayer<User>().loadObjectsFromDB(context:self.context)     var inspections = InspectionDTO.inspectionsForSave(json: json, users:users, in: self.context)     do {       try self.context.save()     } catch {       print(error._userInfo ?? "")     } cross posted on stackoverflow - https://stackoverflow.com/questions/64671451/coredata-context-objects-deallocated-in-a-block/64671707?noredirect=1#comment114361636_64671707 any recommendations are greatly appreciated
1
0
649
Nov ’20