[jboss-user] [EJB 3.0] - Re: Dynamic Named Query?

fhh do-not-reply at jboss.com
Thu Sep 14 06:15:14 EDT 2006

  | <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.



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971515#3971515

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971515

More information about the jboss-user mailing list