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



-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to