Contents

init(fetchDescriptor:modelContainer:isolation:)

Creates a new unsectioned observer with the given fetch descriptor and model container.

Declaration

convenience init(fetchDescriptor: FetchDescriptor<Element> = FetchDescriptor<Element>(), modelContainer: ModelContainer, isolation: isolated (any Actor)? = #isolation) throws

Parameters

  • fetchDescriptor:

    The descriptor defining the fetch criteria.

  • modelContainer:

    The model container from which a new context will be created.

Discussion

A new ModelContext is created from the provided container.

See Also

Creating a results observer with a fetch descriptor