• Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB QL finder method String[] parameter  RSS feed

 
Vasco Dion�sio
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

Can anyone tell me how can I write a query using EJB QL for a finder method that uses an array as a parameter? For instance:

Finder Method
ejbFindByFormId(String[] forms)

I have tryed to use the following Query but without sucess (I get an error)

select object(f) from ZFormBean f where f.formId in ?1


Thanks
Vasco
 
Sivakumar Nachimuthu
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
Passing variable as a argument in IN Clause is not supported in EJB -QL.
It is also not possible in JBOSS-QL . If it is any other App Server, check the app server QL Syntax .

See also

http://www.coderanch.com/t/312594/EJB-JEE/java/write-SQL-clause-EJB-QL

http://www.coderanch.com/t/315334/EJB-JEE/java/clause-finder-method

Siva
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!