mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-11-18 14:48:28 +01:00
fix tests
This commit is contained in:
1 parent
890e150b95
commit
1ea9ad7c4a
12 files changed
+109
-58
No files matched your search
@@ -59,6 +59,11 @@ public protocol ObjectRepresentation: AnyObjectRepresentation {
|
||||
*/
|
||||
associatedtype ObjectType: DynamicObject
|
||||
|
||||
/**
|
||||
The `Sendable` ID to use for referencing the object between isolation contexts.
|
||||
*/
|
||||
func persistentID() -> ObjectType.ObjectID
|
||||
|
||||
/**
|
||||
An instance that may be observed for object changes.
|
||||
*/
|
||||
@@ -85,6 +90,7 @@ public protocol ObjectRepresentation: AnyObjectRepresentation {
|
||||
func asSnapshot(in transaction: BaseDataTransaction) -> ObjectSnapshot<ObjectType>?
|
||||
}
|
||||
|
||||
|
||||
extension NSManagedObject: ObjectRepresentation {}
|
||||
|
||||
extension CoreStoreObject: ObjectRepresentation {}
|
||||
@@ -92,6 +98,14 @@ extension CoreStoreObject: ObjectRepresentation {}
|
||||
extension DynamicObject where Self: ObjectRepresentation {
|
||||
|
||||
// MARK: Public
|
||||
|
||||
/**
|
||||
The `Sendable` ID to use for referencing the object between isolation contexts.
|
||||
*/
|
||||
public func persistentID() -> Self.ObjectID {
|
||||
|
||||
return .init(managedObjectID: self.cs_id())
|
||||
}
|
||||
|
||||
/**
|
||||
An `ObjectPublisher` wrapper for the exact same object
|
||||
|
||||
Reference in new issue
Block a user