Using Observations with SwiftData @Model

I want to use the Observations AsyncSequence on some SwiftData @Model instances to determine if internal calculations need to be done.

When a simple property is linked to the Observations it fires CONTINUOUSLY even though no change is made to the model property.

Also, when I try to observe a property which is a list of another @Model type the Observations sequence does not fire when I add or remove items.

I am hoping to use the async-algorithm's merge function so all the associated sequences can be combined since if any of the associated events should fire the calculation event.

Would you mind to provide a minimal project to demo the issue? I'd be interested in taking a look. Your post can contain a link to where your project is hosted.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

The demo of course is not repeating the problem - I am going to sift through the stacktrace to see when these values are being set because arrrg

https://github.com/chenrichsen/SwiftDataObservations

Using Observations with SwiftData @Model
 
 
Q