Skip to content

Commit 539b57d

Browse files
committed
Change fetch endpoints to require UnmanagedReadOnlyModel instead of UnamangedModel
add-unmanaged-read-only-model-protocol
1 parent ba97e7a commit 539b57d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Sources/CoreDataRepository/CoreDataRepository+Fetch.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import Foundation
1111

1212
extension CoreDataRepository {
1313
/// Fetch items from the store with a ``NSFetchRequest``.
14-
public func fetch<Model: UnmanagedModel>(
14+
public func fetch<Model: UnmanagedReadOnlyModel>(
1515
_ request: NSFetchRequest<Model.ManagedModel>,
1616
as _: Model.Type
1717
) async -> Result<[Model], CoreDataError> {
@@ -21,7 +21,7 @@ extension CoreDataRepository {
2121
}
2222

2323
/// Fetch items from the store with a ``NSFetchRequest`` and receive updates as the store changes.
24-
public func fetchSubscription<Model: UnmanagedModel>(
24+
public func fetchSubscription<Model: UnmanagedReadOnlyModel>(
2525
_ request: NSFetchRequest<Model.ManagedModel>,
2626
of _: Model.Type
2727
) -> AsyncStream<Result<[Model], CoreDataError>> {
@@ -39,7 +39,7 @@ extension CoreDataRepository {
3939
}
4040

4141
/// Fetch items from the store with a ``NSFetchRequest`` and receive updates as the store changes.
42-
public func fetchThrowingSubscription<Model: UnmanagedModel>(
42+
public func fetchThrowingSubscription<Model: UnmanagedReadOnlyModel>(
4343
_ request: NSFetchRequest<Model.ManagedModel>,
4444
of _: Model.Type
4545
) -> AsyncThrowingStream<[Model], Error> {

0 commit comments

Comments
 (0)