Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / JavaBeans / January 2004

Tip: Looking for answers? Try searching our database.

EJB QL parameterized LIKE

Thread view: 
Atte - 14 Nov 2003 08:56 GMT
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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.