Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

parameterized LIKE with EJB QL  RSS feed

 
Atay Akyuz
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
posted November 17, 2003 05:06 AM
--------------------------------------------------------------------------------
Hi!
I want to use "parameterized LIKE" in EJB QL. I use WSAD 5.0 with EJB 2.0. I have tried with theese following two solutions without success:
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"
--------------------------
Thanks in advance
Atte from Sweden
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Atte, as "atay" does not comply with our naming policy, I'll have to ask you to change it.
Thanks.
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 36396
453
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The EJB spec says you can't use a parameter in a like clause. Interesting workaround on JavaRanch thread.
 
Atay Akyuz
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It seems like a very good alternative, but I tried and it doesn't work with WSAD with EJB 2.0. I get the message:
"query cannot be pushed down".
Do anyone know how I get get round this?
Thank in advance
-----------
Atay from Sweden
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!