|
Hello all,
I'm currently using Xdoclet 1.2 beta, and I'm
having a little trouble configuring field-groups and relationship caching. I
have looked into the actual source code of the "bea" module in 1.2, and I was
unable to find support for the new WebLogic 7.0 relationship caching
descriptors.
However, I noticed that there is a
@weblogic.field-group method-level tag, which is working fine. However, the
generated weblogic XML file is producing multiple <field-group> entries,
when only one is necessary with multiple <cmp-field> nested elements.
Also, I am unable to find a way to specify the field-group name for a particular
finder method in the weblogic-query element of the XML file. Here are various
code snippets:
/**
* @ejb.interface-method * @ejb.persistence column-name="doctor_name" * @weblogic.field-group * group-name="DoctorFieldGroup" */ public abstract String getName(); /**
* @ejb.interface-method * @ejb.relation * name="Doctor-Illness" * role-name="Doctor-Has-Illness" * * @weblogic.column-map * foreign-key-column="illness_id" * key-column="illness_id" * * @weblogic.field-group * group-name="DoctorFieldGroup" */ public abstract IllnessLocal getIllness(); Which is producing the following:
<weblogic-rdbms-bean>
<ejb-name>Doctor</ejb-name> <data-source-name>ejbPool</data-source-name> <table-map> <table-name>doctor</table-name> <field-map> <cmp-field>doctorId</cmp-field> <dbms-column>doctor_id</dbms-column> </field-map> <field-map> <cmp-field>name</cmp-field> <dbms-column>doctor_name</dbms-column> </field-map> </table-map>
<field-group>
<group-name>DoctorFieldGroup</group-name> <cmp-field>illness</cmp-field> </field-group> <field-group> <group-name>DoctorFieldGroup</group-name> <cmp-field>name</cmp-field> </field-group> <weblogic-query> <query-method> <method-name>findAllDoctors</method-name> <method-params> </method-params> </query-method> <weblogic-ql><![CDATA[SELECT OBJECT(a) FROM Doctor AS a WHERE a.doctorId IS NOT NULL]]></weblogic-ql> </weblogic-query> <weblogic-query> <query-method> <method-name>findByName</method-name> <method-params> <method-param>java.lang.String</method-param> </method-params> </query-method> <weblogic-ql><![CDATA[SELECT OBJECT(a) FROM Doctor AS a WHERE a.name = ?1]]></weblogic-ql> </weblogic-query> <automatic-key-generation> <generator-type>ORACLE</generator-type> <generator-name>doctor_seq</generator-name> <key-cache-size>10</key-cache-size> </automatic-key-generation>
</weblogic-rdbms-bean>
Instead of producing two <field-group>
elements, there should be only one that contains both of the CMP fields. Also, I
don't see a way to specify the <group-name> in the <weblogic-query>
section.
Any suggestions are appreciated,
Ryan LeCompte
|
