(It's similar to this, but this time it knows it's POSTGRES.)
I have an UpdateQuery:
val uq = kontxt.updateQuery(table("felhaszn"))
uq.addValue(field("kilepett"), null as Timestamp?
and it generates (println(uq.getSQL())
):
update felhaszn set /*...*/ kilepett = cast(? as varchar) /*...*/
Why varchar?
At uq.execute()
it throws an
ERROR: column "kilepett" is of type timestamp without time zone but expression is of type character varying
While the output of println(uq.toString())
shows the correct SQL. So I could work around it by kontxt.query(uq.toString()).execute()
rather than just uq.execute()
.