From: rberehoudougou <nu...@jb...> - 2004-05-26 21:48:41
|
Hi, Here is my primary key class : public class ProductPK implements java.io.Serializable { /* * Note that the primary key fields must be a * subset of the the container-managed Bean fields. * The fields we are marking as container-managed in * our Bean are productID, name, desc, and basePrice. * Therefore our PK fields need to be from that set. */ public String productID; public ProductPK(String productID) { this.productID = productID; } public ProductPK() { } public String toString() { return productID.toString(); } public int hashCode() { return productID.hashCode(); } public boolean equals(Object prod) { return ((ProductPK)prod).productID.equals(productID); } } As you can see , it is a valid compound PK class. For the querry, the only querry I could think of that would match the one in the exception is the following from the ejb-jar.xml file : <query-method> <method-name>findAllProducts</method-name> <method-params /> </query-method> <ejb-ql>SELECT OBJECT (a) FROM ProductBean AS a WHERE a.productId IS NOT NULL</ejb-ql> The select clause does select Object (a) View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3836336#3836336 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3836336 |