diff --git a/Sources/DataStack+DataSources.swift b/Sources/DataStack+DataSources.swift index cba6d2a..306761a 100644 --- a/Sources/DataStack+DataSources.swift +++ b/Sources/DataStack+DataSources.swift @@ -41,7 +41,18 @@ extension DataStack { */ public func publishObject(_ object: O) -> ObjectPublisher { - return ObjectPublisher(objectID: object.cs_id(), context: self.unsafeContext()) + return self.publishObject(object.cs_id()) + } + + /** + Creates an `ObjectPublisher` for a `DynamicObject` with the specified `ObjectID`. Multiple objects may then register themselves to be notified when changes are made to the `DynamicObject`. + + - parameter objectID: the `ObjectID` of the object to observe changes from + - returns: an `ObjectPublisher` that broadcasts changes to `object` + */ + public func publishObject(_ objectID: O.ObjectID) -> ObjectPublisher { + + return ObjectPublisher(objectID: objectID, context: self.unsafeContext()) } /**