We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have faced a problem in that I can only update the JSON column in my object and can't update other columns.
Let say I have this table definition:
class JsonTestTable(tag: Tag) extends Table[JsonBean](tag, "JsonTest0") { def id = column[Long]("id", O.AutoInc, O.PrimaryKey) def test = column[String]("test") def json = column[JsonString]("json", O.Default(JsonString(""" {"a":"v1","b":2} """))) def * = (id, json) <> (JsonBean.tupled, JsonBean.unapply) }
and want to update the JSON column and the test column in one query. How should I do that? I stuck with this:
JsonTests.filter(_.id === 33L).map(o => (o.test, o.json.set(List("c"), JsonString(""" [1] """)))).update(("newValue", "sameAsParameterInSetMethod?"))
but this makes non sens and returns
A query for an UPDATE statement must select table columns only -- Unsupported shape: ProductNode
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have faced a problem in that I can only update the JSON column in my object and can't update other columns.
Let say I have this table definition:
and want to update the JSON column and the test column in one query. How should I do that?
I stuck with this:
but this makes non sens and returns
A query for an UPDATE statement must select table columns only -- Unsupported shape: ProductNode
The text was updated successfully, but these errors were encountered: