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

2006-09-14 Thread fhh

  | select * from address where postcode=:postcode ORDER BY state 
  | :ordering
  | 
  | 
  | 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.

Regards

fhh

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
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


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

2006-09-10 Thread hotat27
Please help.

Doesn't anyone expert on this? Please help...

Many thanks in advance.

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3970653
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user