You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to save a model containing field with a nil value gives Warning:
[ INFO ] GET /health ["request-id": 4F2F36E9-26A1-4F39-9F53-B0AA8757EA81] (Vapor/HTTP/ApplicationResponder.swift:44)
[ INFO ] create test fields=[id, team, name] input=[[F1AEADD2-DFE8-47C1-BAFD-8E208E983CAC, nil, "NameWorks"]] ["request-id": 4F2F36E9-26A1-4F39-9F53-B0AA8757EA81] (FluentKit/Query/QueryBuilder.swift:702)
[ DEBUG ] No available connections on this event loop, creating a new one ["request-id": 4F2F36E9-26A1-4F39-9F53-B0AA8757EA81] (AsyncKit/ConnectionPool/EventLoopConnectionPool.swift:193)
[ DEBUG ] Logging into Postgres db xyz as xyz (PostgresNIO/Connection/PostgresConnection+Authenticate.swift:42)
[ DEBUG ] INSERT INTO "test" ("id", "team", "name") VALUES ($1, $2, $3) RETURNING id as "fluentID" [F1AEADD2-DFE8-47C1-BAFD-8E208E983CAC, <null>, "SomeName"] ["request-id": 4F2F36E9-26A1-4F39-9F53-B0AA8757EA81] (PostgresNIO/Connection/PostgresClient+Query.swift:39)
[ WARNING ] bind $2 type (UNKNOWN 0) does not match expected parameter type (TEXT) ["request-id": 4F2F36E9-26A1-4F39-9F53-B0AA8757EA81] (PostgresNIO/Connection/PostgresClient+Query.swift:74)
finalclassSaveError:Model,Content{staticletschema="test"@ID(key:"id")varid:UUID?@Field(key:"name")varname:String@Field(key:"team")varteam:String?init(){}init(id:UUID?=nil, name:String, team:String?=nil){self.id = id
self.name = name
self.team = team
}}structCreateSaveError:Migration{func prepare(on database:Database)->EventLoopFuture<Void>{return database.schema("test").field("id",.uuid,.identifier(auto:false)).field("name",.string,.required).field("team",.string).create()}func revert(on database:Database)->EventLoopFuture<Void>{return database.schema("test").delete()}}
Trying to save a model containing field with a nil value gives Warning:
As @calebkleveter suggested:
line: https://github.com/vapor/postgres-nio/blob/master/Sources/PostgresNIO/Data/PostgresData%2BOptional.swift#L15
has to be:
The text was updated successfully, but these errors were encountered: