Rename DynamicObjectID -> PersistentID

This commit is contained in:
John Estropia
2026-07-27 15:23:39 +09:00
parent 13093d72d4
commit 16c5bb3e15
23 changed files with 146 additions and 120 deletions
+5 -5
View File
@@ -49,11 +49,11 @@ extension DataStack: FetchableSource, QueryableSource {
/**
Fetches the `DynamicObject` instance in the `DataStack`'s context from an `NSManagedObjectID`.
- parameter persistentID: the `DynamicObjectID` for the object
- parameter persistentID: the `PersistentID` for the object
- returns: the `DynamicObject` instance if the object exists in the `DataStack`, or `nil` if not found.
*/
public func fetchExisting<O: DynamicObject>(
_ persistentID: DynamicObjectID<O>
_ persistentID: PersistentID<O>
) -> O? {
return self.mainContext.fetchExisting(persistentID.managedObjectID)
@@ -86,14 +86,14 @@ extension DataStack: FetchableSource, QueryableSource {
}
/**
Fetches the `DynamicObject` instances in the `DataStack`'s context from a list of `DynamicObjectID`.
Fetches the `DynamicObject` instances in the `DataStack`'s context from a list of `PersistentID`.
- parameter objectIDs: the `DynamicObjectID` array for the objects
- parameter objectIDs: the `PersistentID` array for the objects
- returns: the `DynamicObject` array for objects that exists in the `DataStack`
*/
public func fetchExisting<O: DynamicObject, S: Sequence>(
_ objectIDs: S
) -> [O] where S.Iterator.Element == DynamicObjectID<O> {
) -> [O] where S.Iterator.Element == PersistentID<O> {
return self.mainContext.fetchExisting(objectIDs)
}