subscript(_:as:)

Returns the model for the specified identifier, downcast to the appropriate class.

Declaration

subscript<T>(id: PersistentIdentifier, as as: T.Type) -> T? where T : PersistentModel { get }