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
Attempt to create/insert a model where things = [].
Outcome
I get the following error:
[ WARNING ] PSQLError(code: server, serverInfo: [sqlState: 42804, file: parse_target.c, hint: You will need to rewrite or cast the expression., line: 595, message: column "things" is of type integer[] but expression is of type jsonb[], position: 256, routine: transformAssignedExpr, localizedSeverity: ERROR, severity: ERROR], triggeredFromRequestInFile: PostgresKit/PostgresDatabase+SQL.swift, line: 71
Additional notes
It works when set to a non-empty Set.
The text was updated successfully, but these errors were encountered:
Describe the issue
Incorrect column type when encoding an empty Set
Vapor version
4.95
Operating system and version
macOS 14.4
Swift version
Swift Package Manager - Swift 5.10.0-dev
Steps to reproduce
I'm using a Fluent model with a field defined as:
where
Thing
is an Int enum.Attempt to create/insert a model where
things = []
.Outcome
I get the following error:
[ WARNING ] PSQLError(code: server, serverInfo: [sqlState: 42804, file: parse_target.c, hint: You will need to rewrite or cast the expression., line: 595, message: column "things" is of type integer[] but expression is of type jsonb[], position: 256, routine: transformAssignedExpr, localizedSeverity: ERROR, severity: ERROR], triggeredFromRequestInFile: PostgresKit/PostgresDatabase+SQL.swift, line: 71
Additional notes
It works when set to a non-empty Set.
The text was updated successfully, but these errors were encountered: