-
1. Re: Basic question about ejb-ql query
sesques May 2, 2004 10:49 AM (in response to balteo)Hi Julien,
It is not possible to pass an array, ot a list or a collection to a finder query. I tried also with JBOSS-QL but same result.
If you find a solution, I'm very interrested.
Pascal -
2. Basic question about ejb-ql query
balteo May 2, 2004 12:21 PM (in response to balteo)Hello Pascal,
Perhaps the fact that it is not possible to deal with a collection in an ejb-ql query explains why it it not possible to pass a collection as an argument to an finder method. That looks like a serious limitation but a logical one. I think I am going to turn to plain JDBC and forget the finder methods for now.
I'll keep you posted if I have an idea.
Thanks,
Julien. -
3. Re: Basic question about ejb-ql query
sesques May 2, 2004 1:34 PM (in response to balteo)Hi Julien,
I agree that the EJB spec have limitations, and not only a few. But for this subject, we must think that even in SQL it is not possible. The only way to do that is to have theses elements (the list) in a table (temporary or not).
We cannot pass a collection or a list as parameter in SQL or a stored procedure. Eventually, we can pass a String with all the elements (separated by a comma for exemple) and parse it to build a temporary table and then use this table as a filter in a subquery.
But if you have an idea, it will be welcome
Pascal