Reputation: 1575
Am using hibernate criteria to fetch data from database. Now i need to fetch data based on title
and createdDate
, for that i added
if(condition){
criteria.addOrder(Order.asc("title"));
}else{
criteria.addOrder(Order.asc("createdDate"));
}
The issue is, its working for createdDate
but not for title
Iam getting the result as TEST,d1,ga,new,pre,ss,t
which should be like d1,ga,new,pre,t,TEST
UPDATE: The issue is with case, when i changed TEST to test its coming as proper.
Upvotes: 0
Views: 1005