This content has been marked as final. Show 2 replies
Doesn't anyone expert on this? Please help...
Many thanks in advance.....
<query>select * from address where postcode=:postcode ORDER BY state :ordering </query> query.setParameter("ordering", "ASC")
I have not actually checked ut my first guess would be that you will get
select * from address where postcode=5000 ORDER BY state 'ASC'
which will not work for obvious reasons. Propably the easiest way to solve this is to have two queries and then choose dynamically which one to use.