persistence@glassfish.java.net

Re: _at_NamedQuery for finding details from more than 1 column

From: Wouter van Reeven <wouter_at_van.reeven.nl>
Date: Sat, 5 May 2007 17:52:16 +0200

Hi,

On Fri, May 04, 2007 at 10:02:44AM -0700, Marina Vatkina wrote:
> Unless in real life you have 100 'OR's in your query, I suggest you
> predefine those 3 queries and depending on the parameter in your method,
> call the specific one.

I agree with Marina. Is there any reason why you have three parameters but only
use one at a time? Is there any situation where you use two parameters or even
three? If not, splitting this query into three separate ones probably is your
best option.


Wouter

-- 
People: "If she weighs the same as a Duck, she's made of wood!"
Sir Bedevere: "And therefore...?"