Affects Version/s: None
Fix Version/s: 1.2.0
Our application requires the push-down sql from named/dynamic query be the same each time a same JPQL is executed.
In the following JPQL example, however,
query="UPDATE BasicA t set t.name= ?1, t.age = ?2 WHERE t.id = ?3"
we observe that two different push-down sql could be generated:
UPDATE PDQBasicA t0 SET name = ?, age = ? WHERE (t0.id = ?)
UPDATE PDQBasicA t0 SET age = ?, name = ? WHERE (t0.id = ?)
This unpredictable behavior breaks our application. The indeterministic ordering of the update list is due to the indeterministic ordering provided by HashMap and HashSet in QueryExpressions and JPQLExpressionBuilder, respectively.
When the HashMap is changed to LinkedHashMap and HashSet to LinkedHashSet, the access order based on insertion will be preserved and the generated push-down sql will have predictable ordering of update list. The attached patch fixes this problem.
|Assignee||Michael Dick [ mikedd ]|
|Resolution||Fixed [ 1 ]|
|Fix Version/s||1.2.0 [ 12313102 ]|
|Status||Open [ 1 ]||Resolved [ 5 ]|
|Status||Resolved [ 5 ]||Closed [ 6 ]|
|Transition||Time In Source Status||Execution Times||Last Executer||Last Execution Date|
|1d 14h 15m||1||Michael Dick||05/May/08 21:52|
|672d 21h 39m||1||Donald Woods||09/Mar/10 18:32|