New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong precedence rules for SQL serialization #1219

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

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
@mwillema

This comment has been minimized.

Show comment
Hide comment
@mwillema

mwillema Apr 14, 2015

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

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