Posts

Post not yet marked as solved
1 Replies
I'm very interested in how this is supposed to work. Right now I just get a crash. The insert doesn't throw and even if I call try modelContext.save() after the insert, I just get a crash rather than an error which I can catch and handle. It's nice that SwiftData can enforce the unique attribute constraint in the underlying database, but what's the point if I can't handle it and the app just crashes?