users@glassfish.java.net

how to create dynamic where clause in ejbql of jpa/toplink essentials

From: <glassfish_at_javadesktop.org>
Date: Mon, 08 Oct 2007 08:42:10 PDT

Hi All,

I have a requirement to use create dynamic where clause in the already annotated ejbql:
for eg.

annotated query: select e from emp where 1=1

later in the code i need to add another where clause like : ename="abc"

how i can do this since the query is already written in the entity itself?

Any help will be greatly appreciated.

Regards,
Sarvesh
[Message sent by forum member 'sarveshsh' (sarveshsh)]

http://forums.java.net/jive/thread.jspa?messageID=238963