Wouter/Marina,
Thank you for all your suggestions.
>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
In the client side, I intend to only supply one textfield and a button which
when entry is supplied by the client, will search the database. If it does
not find item details by itmid, it will search the next column: description,
if it does not, then the next column: itmname.
I think, if this don't work, I will separate all of them and use the drop
down menu.
So if user enters 'description', it calls the description method, and if
they enters itemid/code, it calls
the itemid method, and if by itemname, it calls the itemname method.
Thanks for all your suggestions.
eve
>From: Wouter van Reeven <wouter_at_van.reeven.nl>
>Reply-To: persistence_at_glassfish.dev.java.net
>To: persistence_at_glassfish.dev.java.net
>Subject: Re: @NamedQuery for finding details from more than 1 column
>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...?"
_________________________________________________________________
Could you be the guest MSN Movies presenter? Click Here to Audition
http://www.lightscameraaudition.co.uk