SQL : It is not possible to use an SQLUpdateClause which sets columns to expressions
Bug #650617 reported by
Luis Fernando Planella Gonzalez
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Querydsl |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Currently, the update clause only have a .set(Path<T>, T), but with this, it is not possible to do things like "update t set a = a + 1"
I think we would need another method like .set(Path<T>, Expression<T>).
Maybe this should be supported in inserts as well (defined on the StoreClause). Maybe custom expressions which invokes db functions would work (like insert into x values (current_
tags: | added: sql |
summary: |
- It is not possible to use an SQLUpdateClause which sets columns to + SQL : It is not possible to use an SQLUpdateClause which sets columns to expressions |
Changed in querydsl: | |
importance: | Undecided → Medium |
Changed in querydsl: | |
status: | In Progress → Fix Committed |
To post a comment you must log in.
I implemented that change in SVN trunk, but there is now the problem that set(someStringPath, null) calls are ambiguous and the compiler complains.
This can be fixed like this though :
set(someStringPath, (String)null)
Maybe an additional setNull(Path<?> path) could work. What do you think?