Skip to content
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

Order by null value first/last on mysql #439

Closed
bbbenja opened this issue Jun 12, 2013 · 5 comments
Closed

Order by null value first/last on mysql #439

bbbenja opened this issue Jun 12, 2013 · 5 comments
Milestone

Comments

@bbbenja
Copy link

@bbbenja bbbenja commented Jun 12, 2013

Hi, i saw this issue (#174) is resolved but only for mysql. When will it be possible in mysql ?
Thx

@timowest
Copy link
Member

@timowest timowest commented Jun 12, 2013

Please ask questions in the Querydsl google group.

Nulls first/last works for the SQL module. Did you try it with MySQL and had issues?

@bbbenja
Copy link
Author

@bbbenja bbbenja commented Jun 12, 2013

Sorry i would say that it works only in SQL. Yes I try with MySQL and it doesn't work.

@timowest
Copy link
Member

@timowest timowest commented Jun 12, 2013

MySQL failed with Querydsl SQL or JPA?

Could you provide the Querydsl query and how it looks in JPQL or SQL.

Also which version are you using?

@bbbenja
Copy link
Author

@bbbenja bbbenja commented Jun 13, 2013

I use querydsl-jpa (3.1.1).

In JPQL or SQL, query is like "SELECT … ORDER BY field1 asc nulls first" but in MySQL the "nulls first" is deleted. That's normal because this operation is not allowed in MySQL, to order null values last in MySQL i used query like this "SELECT … ORDER BY ISNULL(field1) DESC, field1 DESC" for example.

@timowest
Copy link
Member

@timowest timowest commented Jun 26, 2013

Released in 3.2.1

@timowest timowest closed this Jun 26, 2013
@timowest timowest added this to the 3.2.1 milestone Apr 14, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants