From 3e6e6003f42d1808da27002f936710e8a9f23bf6 Mon Sep 17 00:00:00 2001 From: Sam Bishop Date: Mon, 29 Apr 2024 16:21:46 -0600 Subject: [PATCH] Add unchecked sendable to Todo (#130) --- Sources/App/Models/Todo.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Sources/App/Models/Todo.swift b/Sources/App/Models/Todo.swift index c3c9eac1..d3251fec 100644 --- a/Sources/App/Models/Todo.swift +++ b/Sources/App/Models/Todo.swift @@ -1,7 +1,10 @@ import Fluent import Vapor -final class Todo: Model, Content { +/// Property wrappers interact poorly with `Sendable` checking, causing a warning for the `@ID` property +/// It is recommended you write your model with sendability checking on and then suppress the warning +/// afterwards with `@unchecked Sendable`. +final class Todo: Model, Content, @unchecked Sendable { static let schema = "todos" @ID(key: .id)