this is my code:
class RoleData( var roleId: String, var data: String)
object Library extends Schema {
val roleData = table[RoleData]
on(roleData)(s => declare(
s.roleId is(primaryKey, indexed),
s.data is (dbType("jsonb"))
))
when i call :
roleData.insert(new RoleData("id3",jsonb))
the error happend :Caused by: org.postgresql.util.PSQLException: ERROR: column "data" is of type jsonb but expression is of type character varying
:You will need to rewrite or cast the expression.so ,my question is how to insert a jsonb string