Hi all
I have a little query for someone who has worked with Oracle9iAS. I think it
should also be valid for someone with Orion experience, as Orion forms the
heart of Oracle9iAS.
The question is: how do I declare the "<primkey-mapping>" for a cmp entity
bean inside orion-ejb-jar.xml, which has a compound primary key (a user
defined class).
The documentation of the Oracle9iAS server speaks only about the simple case
of a single column being the primary key, in which case the
<entity-deployment> tag is defined as below. The problem is that the DTD of
orion-ejb-jar.xml defines the <entity-deployment> element as having "zero or
one" <primkey-mapping> elements, and the <primkey-mapping> tag can have one
and only one <cmp-field-mapping>
<entity-deployment name="EmployeeBean"
location="cmpapp/EmployeeBean" table="EMP" data-source="jdbc/OracleDS">
<primkey-mapping>
<cmp-field-mapping name="empNo"
persistence-name="EMPNO" />
</primkey-mapping>
<cmp-field-mapping name="empName"
persistence-name="ENAME" />
<cmp-field-mapping name="salary"
persistence-name="SAL" />
<finder-method query="$empName = $1">
<method>
<ejb-name>EmployeeBean</ejb-name>
<method-name>findByName</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
</method>
</finder-method>
<finder-method query="">
<method>
<ejb-name>EmployeeBean</ejb-name>
<method-name>findAll</method-name>
<method-params></method-params>
</method>
</finder-method>
</entity-deployment>
Any help will be appreciated.
Regards
Sanjeev
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".