Hi,
Thanks a lot for ur time. I have a CMP entity bean, Supplier, whose abstract schema is as below:
suppId - Integer (primary key),
suppName -
String This schema is already mapped with the underlying 'Supplier' table in the DB. Also, this table contains a few valid records. However, the findByPrimaryKey(Integer) method of this bean returns null.
Could some one please help me out with this problem. Do I need to configure any DB settings. I am using WSAD v5.1.2, CloudScape DB and CMP 2.0 specification.
I am also including the deployment descriptor for ur consideration:
<entity id="Supplier">
<ejb-name>Supplier</ejb-name>
<local-home>com.abc.xyz.entity.SupplierLocalHome</local-home>
<local>com.abc.xyz.entity.SupplierLocal</local>
<ejb-class>com.abc.xyz.entity.SupplierBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.Integer</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>Supplier</abstract-schema-name>
<cmp-field id="CMPAttribute_1128583285244">
<field-name>suppId</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1128583285254">
<field-name>suppName</field-name>
</cmp-field>
<primkey-field>suppId</primkey-field>
<query>
<description></description>
<query-method>
<method-name>findBySuppName</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
<ejb-ql>select object(o) from Supplier o where o.suppName = '?1'</ejb-ql>
</query>
</entity>
Bye
Thanks,
Kalyan
[ October 10, 2005: Message edited by: Kalyan Akella ]