Hi!
I want to use parameterized LIKE in EJB QL. I use WSAD 5.0.
I have tried with theese following two solutions without success: Please help me.
SELECT OBJECT(o) FROM Uppgift o WHERE o.objectId LIKE ?1
SELECT OBJECT(0) FROM Uppgift o WHERE LOCATE( ?1, o.description ) > 0
The error message I get is: "qeury cannot be pushed down"
-----------------
Atte from Sweden
Eki Y. Baskoro - 18 Dec 2003 08:26 GMT
G'Day,
I don't think that EJB-QL supports LIKE keyword. You need to use the EJB
container's specific feature to extend this support. For example, in JBoss,
we have JBossQL that supports LIKE keyword.
Michael Meyer - 18 Dec 2003 08:53 GMT
hi,
EJB-QL supports the LIKE Keyword, have a look at
http://www.ejb-ql.com
Michael
> G'Day,
>
> I don't think that EJB-QL supports LIKE keyword. You need to use the EJB
> container's specific feature to extend this support. For example, in JBoss,
> we have JBossQL that supports LIKE keyword.
Bernard Koninckx - 18 Jan 2004 12:16 GMT
Hi,
In the first EJB QL you can't use a dynamic argument at the runtime. You can
see that in the O'Reilly book Enterprise JavaBeans at the section EJB QL.
You have been write o.objectID LIKE "%10%" by sample.
I've used the second solution on a jBoss platform server and it's OK. But I
think than you have an error in your EJB QL statement. You have declared an
alias o and in the predicate Object(O). So, I think so you must use
OBJECT(o).
You can try It
Bernard
> Hi!
>
[quoted text clipped - 8 lines]
> -----------------
> Atte from Sweden