Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
acwright committed Nov 11, 2019
1 parent ab58e6b commit 1ae01a6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Sources/Cabinet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ public extension Cabinet {
fetchRequest.predicate = NSPredicate(format: "id IN %@", ids)

let batchDeleteRequest = NSBatchDeleteRequest(fetchRequest: fetchRequest)
batchDeleteRequest.resultType = .resultTypeObjectIDs

do {
let result = try managedObjectContext.execute(batchDeleteRequest) as! NSBatchDeleteResult
Expand All @@ -144,6 +145,7 @@ public extension Cabinet {
childFetchRequest.predicate = NSPredicate(format: "%K IN %@", I.foreignKey, ids)

let childBatchDeleteRequest = NSBatchDeleteRequest(fetchRequest: childFetchRequest)
childBatchDeleteRequest.resultType = .resultTypeObjectIDs

let childResult = try managedObjectContext.execute(childBatchDeleteRequest) as! NSBatchDeleteResult
let childChanges: [AnyHashable: Any] = [
Expand Down

0 comments on commit 1ae01a6

Please sign in to comment.