sqlkata/querybuilder

Fails to update jsonb field

mesgar opened this issue · 1 comments

Exception:
Npgsql.PostgresException: 42804: column "message" is of type jsonb but expression is of type text

Code:
json = new {message = JsonConvert.SerializeObject(data)};
affected = db.Query("xxxxx").Where(whereLeft, whereRight).Update(json);

SQL:
The query runs fine by itself.
image

Npgsql Version: 7.0.4
SQLKata Version: 2.4.0

🙏

This answer did the trick!

for now you can use the db.Statement method

🙏