It's unfortunate that SwiftData doesn't solve threading issues. When you opt into Complete Concurrency Checking (https://donnywals.com/enabling-concurrency-warnings-in-xcode-14/) Xcode warns you about concurrency issues due to models and model contexts not being Sendable.
Enabling Concurrency warnings in Xcode 14 – Donny Wals

If you want to make sure that your code adopts Swift concurrency as correctly as possible in Swift 5.7, it's a good idea to enable the Strict Concurrency Checking () in your project. To do this…

Donny Wals
@donnywals I don't think it be "solved" in principle, but I wish there was some static analysis tool that would catch the misuses better than the current system does.
@a_grebenyuk yeah, same. These Sendable warnings are a good start but I wish they were errors
@donnywals that’s why I wrongly predicted that model objects would be value types and contexts would be actors that would manage access and mutation
@dimsumthinking @donnywals conceptually, SwiftData is reimplemented CoreData with nicer syntax and less boilerplate.
I have seen no meaningful difference between the stacks.
@donnywals Thanks for this! It might be beneficial to file it as Feedback and request improvements
@danielkasaj I'm pretty sure this is intentional tbh and not something they can fix easily if at all. I'm for sure filing lots of feedback though :D