Luis Luvia
08/21/2023, 4:53 PMorg.postgresql.util.PSQLException: ERROR: column "id" is of type ulid but expression is of type character varying
I discovered that this is because, with prepared statements, the parameter is treated as a varchar instead of the ULID type. The easiest way to resolve this would be to cast the parameter as a ULID. I see in the code, particularly in PostgreSQL.kt, that there is some code to cast JSONB appropriately. However, I am not sure how I would do this for my new ULID type. Is there any standardized way to ensure that Exposed will add a cast to my ULID type? If not, may I have guidance on how to best go about doing this?
Thanks.Luis Luvia
08/21/2023, 6:25 PMsetParameter
to notNullValueToDB
, and set the type there. Exposed handled the rest.