[jboss-user] [EJB/JBoss] - EJB QL (2.1), passed parameters to IN predicate in WHERE cla

Royski do-not-reply at jboss.com
Mon Nov 20 15:05:19 EST 2006


I have a CMP finder method whose WHERE clause has the fragment: ...WHERE d.value IN (?1)...
If I pass a simple string parameter (eg, "you") in to the method, the search works. But if I pass something like "'you', 'me', 'them'" the search fails. 
If I hard-code the multi-word string in to the finder method (eg, ...WHERE d.value IN ('you', 'me', 'them')...), I get the expected results. So it fails because I'm passing the multi-word string as a parameter.
Is there a special way of passing in such a parameter?
cheers
Roy

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

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



More information about the jboss-user mailing list