Hi all,
I have try to customize
thea findBy method in one of my Bean in the following.
finder-method query="select catname,description from cat_ejb_Category where
$description like '%$1%'"
partial="false"
!-- Generated SQL: "select catname,description from cat_ejb_Category where
ot; [EMAIL PROTECTED]
Sent: Thursday, October 19, 2000 11:59 AM
Subject: R: customize finder method
Hi Leung,
You should'nt use the '%' symbols in the finder definition, instead you
should attach them to the parameter you pass to the finder method.
i.e.
finder definition:
finder-method query="s
: Thursday, October 19, 2000 7:17 AM
To: Orion-Interest
Subject: Re: customize finder method
Actually it makes more sense to place the % in the finder method as it
abstracts the SQL from the underlying code. A developer working with entity
beans should never need to use any SQL (even if it only is one
I agree Joe, but can you tell me how did you find out about this? I had the
same problem long time ago and I end up with Giustino's solution! Just want
to learn how to find the best answer to my questions.
Figured it out :-)
If $1 is a String, it is escaped and quoted before putting it in the