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

Comments

Projects
None yet
2 participants
@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

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Jun 12, 2013

Member

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?

Member

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

This comment has been minimized.

Show comment
Hide comment
@bbbenja

bbbenja Jun 12, 2013

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

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

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Jun 12, 2013

Member

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?

Member

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

This comment has been minimized.

Show comment
Hide comment
@bbbenja

bbbenja 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.

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

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Jun 26, 2013

Member

Released in 3.2.1

Member

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