Hi!

Tom Cook wrote:
> Marco writes:
>  > How can I do this?
> 
> Well, I'm no expert, but I'd say you'd just leave it out of your
> jaws.xml and add a method to your bean something like:
> 
> public Collection ejbFindByWingColour( String colour )
> {
>                                 ...
>                                 ResultSet rs = stmt.executeQuery( "SELECT * FROM 
>AEROPLANE_HATS WHERE COLOUR='" + colour + "'" );
>                                 ...
>                                 Collection c = ...;
>                                 return c;
> }

Nope, won't work. You have to use BMP if you want to define your own
finder methods. No mixing.

What you could do though is make a session bean that does the query and
then return either the list of primary keys to the client, or convert
them to EJBObjects by calling findByPrimaryKey on the EntityBean.

/Rickard



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to