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
It should be possible to define case class with Option[JsonValue[...]] or Option[JsonbValue[...]] field, set value to None, and save to Postgres table with nullable json or json column using quill query with insertValue(...)
Actual behavior
Postgres throws exception when saving None values for Option[JsonValue[...]] or Option[JsonbValue[...]] fields: ERROR: column "..." is of type json but expression is of type character varying
Version: v4.8.3
Module: quill-jdbc-zio
Database: Postgres
Expected behavior
It should be possible to define case class with
Option[JsonValue[...]]
orOption[JsonbValue[...]]
field, set value to None, and save to Postgres table with nullable json or json column using quill query withinsertValue(...)
Actual behavior
Postgres throws exception when saving None values for
Option[JsonValue[...]]
orOption[JsonbValue[...]]
fields:ERROR: column "..." is of type json but expression is of type character varying
Steps to reproduce the behavior
Similar reproduction is for
Option[JsonbValue[...]]
Workaround
override
entityEncoder
andastEncoder
methods in custom Postgres context and set sqlType toTypes.OTHER
.@getquill/maintainers
The text was updated successfully, but these errors were encountered: