Hello.
I use h2, have varchar column and want update column: concatenate current value and additional value.
For example, current value of column ",1,2," and I want add "3," and get finally ",1,2,3,".
I try to use code like this from documentation (but in documentation it's integer column).
Lessons.update(where = { Lessons.id eq lessonId }) {
with(SqlExpressionBuilder) {
it.update(column, column + "$entityId$ELEM_COLLECTION_SEPARATOR")
}
}
But it throws exception
Caused by: org.h2.jdbc.JdbcSQLFeatureNotSupportedException: Feature not supported: "VARCHAR +"; SQL statement:
UPDATE LESSONS SET CAME_STUDENTS=LESSONS.CAME_STUDENTS+? WHERE LESSONS.ID = ?
Exposed version 0.20.3.
Oh, sorry to bother, I understood, that I should just use SqlExpressionBuilder.concat(column, stringLiteral("$entityId$ELEM_COLLECTION_SEPARATOR"))