Hi
I'm new to Hibernate and posted this question in another forum, but haven't got any solution. Sorry for the cross posting.
My issue is to order addresses by a particular state (Maryland) and then show all other states after that. I was able to get he SQL from the other post. I want an equivalent of this SQL in Hibernate using Criteria API
Code:
select * from prsn_addr where ...
order by case when usps_state_cd = 'MD' then 0 else 1 end,usps_state_cd
The output I want is to show the addresses in MD first and then show all other after that. One of the responses was in nHibernate, but it is not working for me as we use Java. Also got a response with HQL, but want to try with criteria first. If anyone can help me out here in the right direction, that would be awesome
Thanks
Harish