This is caused by the fact that SwiftData does not yet support encoding custom Codable types, despite the claims from Apple. You'll have to make your model only use primitives such as Int, String, Date, etc
Topic:
App & System Services
SubTopic:
iCloud & Data
Tags: