mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-03-20 00:24:01 +01:00
Added utility for re-faulting all objects in a transaction/dataStack
This commit is contained in:
@@ -188,6 +188,19 @@ public /*abstract*/ class BaseDataTransaction {
|
||||
objects.forEach { context.fetchExisting($0)?.deleteFromContext() }
|
||||
}
|
||||
|
||||
/**
|
||||
Refreshes all registered objects `NSManagedObject`s in the transaction.
|
||||
*/
|
||||
public func refreshAllObjectsAsFaults() {
|
||||
|
||||
CoreStore.assert(
|
||||
self.isRunningInAllowedQueue(),
|
||||
"Attempted to refresh entities outside their designated queue."
|
||||
)
|
||||
|
||||
self.context.refreshAllObjectsAsFaults()
|
||||
}
|
||||
|
||||
|
||||
// MARK: Internal
|
||||
|
||||
|
||||
Reference in New Issue
Block a user