The variable is being used before any initialization has taken place. selectedStagione can be replaced with a constant or static value. Then within the body of the code, a refetch of the data, using the modelContext.fetch() can be done in response to some kind of change.
@Query(filter: #Predicate<CalendarioPartite> { $0.stagione == selectedStagione}) private var partite: [CalendarioPartite]
Topic:
App & System Services
SubTopic:
iCloud
Tags: