Wrong precedence rules for SQL serialization #1219

Closed
mwillema opened this Issue Feb 24, 2015 · 2 comments

Projects

None yet

2 participants

@mwillema

I have an issue with QueryDSL SQL >= 3.5.0 and the placement of parenthesis in the generated SQL in order by statements. The DB is H2 v1.3.176

Given the following statement:

.orderBy(MY_TABLE.X.multiply(a).divide(MY_TABLE.Y.multiply(b)).asc())

with a = 100 and b = 200 for example

I expect the following SQL:

order by MY_TABLE.X * 100 / (MY_TABLE.Y * 200) asc

but instead I get:

order by MY_TABLE.X * 100 / MY_TABLE.Y * 200 asc

which does not lead to the same result.

@timowest timowest added the bug label Feb 24, 2015
@timowest timowest added this to the 4.0.0 milestone Feb 24, 2015
@Shredder121 Shredder121 closed this in #1220 Mar 10, 2015
@timowest timowest removed the progress label Mar 13, 2015
@timowest timowest modified the milestone: 3.6.3, 4.0.0 Mar 31, 2015
@mwillema

I confirm the initial issue is now fixed in 3.6.3. Thx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment