user1807630
user1807630

Reputation: 91

hibernate CriteriaBuilder orderBy null ordering

In my hibernate project, all the CriteriaBuilder query with orderBy column has a nulls last getting added automatically. I am using Oracle db. For example:

order by creation_date desc nulls last

Is there a way to change this behavior? What I want is

order by creation_date desc

I even tried column with NOT Null constraint but not seeing any difference.

Upvotes: 0

Views: 138

Answers (1)

user1807630
user1807630

Reputation: 91

The issue was with my project. Some initialization code was programmatically adding DEFAULT_NULL_ORDERING property with the value of last.

Upvotes: 1

Related Questions