Hi,

It's been a long night (the fun kind not the working kind) so I am a
little blurry!

But.

If you use LIKE then you must use JBoss-QL. You do this with the
@jboss.query tag in the class comment.

Here is an example from my project...


*  @ejb.finder
 *    signature="java.util.Collection
findBySessionTemplateNameLike(java.lang.String likeSessionTemplateName)"
 *       query="SELECT OBJECT (st) FROM SessionTemplate st WHERE st.name
LIKE ?1"
 *    result-type-mapping="Local"
 *    method-intf="LocalHome"
 *
*
 * @jboss.query
 *    signature="java.util.Collection
findBySessionTemplateNameLike(java.lang.String likeSessionTemplateName)"
 *    query="SELECT OBJECT (st) FROM SessionTemplate st WHERE st.name
LIKE ?1"
*

Cheers,

Tim

-----Original Message-----
From:   Harkness, David [mailto:[EMAIL PROTECTED]
Sent:   Thu 15/01/2004 01:21
To:     [EMAIL PROTECTED]
Cc:     
Subject:        RE: [Xdoclet-user] @ejb.select problems with JBoss
On Tue, 2004-01-13 at 20:21, Patrick Bakker wrote:
> I?ve been trying to get the following select method code to work in
> an EJB I call Product: 
> 
> /**
>  * @ejb.select
>  *          signature="java.util.Collection
>                        ejbSelectNameMatch(String nameMatch)" 
>  *          query="SELECT OBJECT(p) FROM Product p WHERE p.name LIKE
?1"

I've only done enough EJB-QL to get my basic finders working, and maybe
the syntax is partially fluid, but all of my queries use "<bean> AS
<alias>", e.g. "Product AS p". Is this the problem, and by the time it
gets to the "?1" it's simply too confused to report the error correctly?

Out of curiousity since I haven't used ejbSelect methods yet, why would
you not just make that a finder? Don't you need a Product bean instance
before you can execute a select method? Or am I misunderstanding select
methods?

David Harkness
Sr. Software Engineer
Sony Pictures Digital Networks
(310) 482-4756


-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

The information in this email is confidential and is intended solely for
the addressee. Access to this email by anyone else is unauthorised. 

If you are not the intended recipient, any disclosure, copying,
distribution or any action taken or omitted to be taken in reliance on
it, except for the purpose of delivery to the addressee, is prohibited
and may be unlawful. Kindly notify the sender and delete the message and
any attachment from your computer. 


-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to