Update postgres table contains JSON(B) object using $connection->createCommand()->update () method
Updated record
Database Exception – yii\db\Exception
Object of class yii\db\JsonExpression could not be converted to string
Failed to prepare SQL: UPDATE "object_attributes" SET "attr_value"=:qp2 WHERE "UUID" = :uuid and "attr_name"=:attr_name
↵
Caused by: yii\base\ErrorException
Object of class yii\db\JsonExpression could not be converted to string
in /private/var/www/zzz/www/vendor/yiisoft/yii2/db/Command.php at line 315
I faced the same thing after the update and it's really urgent for me, had to revert to 2.0.13.
yii\db\ArrayExpression has the same error
The fix will be included in patch-release
I've created a test to verify that SQL builds successfully. See 2eba4b54f
Could anyone post exact piece of code to reproduce the problem, please?

I tested here, and noticed that the problem occurs when you don't wrap the value in a JsonExpression.
Most helpful comment
yii\db\ArrayExpressionhas the same error