Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Order by null value first/last on mysql #439
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.