Good day,
As per example in DSL · JetBrains/Exposed Wiki · GitHub you can use existing value of the entry by wrapping it into with(SqlExpressionBuilder) and it works perfectly with String or Integers. Unfortunately for boolean it is not converting them to boolean expression
As an example:
StarWarsFilms.update({ StarWarsFilms.sequelId eq 8 }) {
with(SqlExpressionBuilder) {
it.update(StarWarsFilms.sequelId, StarWarsFilms.sequelId + 1)
}
}
works for
val sequelId: Column = integer(“sequel_id”).uniqueIndex()
but for
val testBoolean: Column
…
StarWarsFilms.update({ StarWarsFilms.sequelId eq 8 }) {
with(SqlExpressionBuilder) {
it.update(StarWarsFilms.testBoolean, testBoolean and true)
}
}
doesn’t work. Any suggestions how to be able to use existing value with boolean expressions in update statement?