1) add a new home method selectByCodes (or queryByCodes)
2) in the home method implementation ejbHomeSelectByCodes you generate an EJB-QL query that uses an in operator in the where instead of the member of. Something like this: Speciality.code in (?1, ?2, ?3, ?4).
3) after you generate the query call a dynamic ql mapped ejbSelect query. You will have to convert the collection into an Object array but that is simple with toArray.
Fairly simple?
-dain
On Tuesday, November 19, 2002, at 11:40 AM, kiuma wrote:
Hi all,
I'm trying to write this query
* signature="java.util.Collection findByCodes( java.util.Collection pCodes )"
* result-type-mapping="Local"
* query="SELECT OBJECT(Speciality) FROM WaSpeciality Speciality WHERE Speciality.code MEMBER OF ?1"
I think that jboss and ejb in general don't like this form.
Is there any way to extract a collection of beans matching a collection of id?
regards
-------------------------------------------------------
This sf.net email is sponsored by: To learn the basics of securing your web site with SSL, click here to get a FREE TRIAL of a Thawte Server Certificate: http://www.gothawte.com/rd524.html
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user
-------------------------------------------------------
This sf.net email is sponsored by: To learn the basics of securing your web site with SSL, click here to get a FREE TRIAL of a Thawte Server Certificate: http://www.gothawte.com/rd524.html
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user