It looks as there should be a swap around line 18 in jbosscmp-jdbc-rel-1-n.j
to get the role name of the other side of the relation. It should also
handle the case when the relationship is unidirectional, and there is no
other side (swap can't be done). See how this is handled in relationships.j.
I don't want to touch it, I don't know JBoss. I've filed a bug report.

Aslak.

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Jozsa
> Kristof
> Sent: 5. januar 2002 15:17
> To: [EMAIL PROTECTED]
> Subject: [Xdoclet-user] relationships in jbosscmp-jdbc.xml
>
>
> Hi,
>
> The XDoclet generated jbosscmp-jdbc.xml looks incorrect as I see. The
> ejb-relationship-role-name should not be the same as I know. I've provided
> these 2 tags in the two beans:
>
> @ejb:relation name="Manufacturer-Product"
> role-name="manufacturer-has-products"
>
> @ejb:relation name="Manufacturer-Product"
> role-name="product-belongsto-manufacturer"
>
>
> And the generated jbosscmp-jdbc.xml's according part is:
> --
> <relationships>
>   <ejb-relation>
>   <ejb-relation-name>Manufacturer-Product</ejb-relation-name>
>
>   <!-- one to many -->
>   <foreign-key-mapping>
>
>   <ejb-relationship-role>
>
>
> <ejb-relationship-role-name>product-belongsto-manufacturer</ejb-re
> lationship-role-name>
>     <fk-constraint>false</fk-constraint> <!-- there wont be a fk here -->
>     <foreign-key-fields />
>   </ejb-relationship-role>
>
>   <ejb-relationship-role>
>
>
> <ejb-relationship-role-name>product-belongsto-manufacturer</ejb-re
> lationship-role-name>
>     <fk-constraint>true</fk-constraint>
>     <foreign-key-fields>
>       <foreign-key-field>
>         <field-name>id</field-name>
>         <!-- here I should do something to generate property
> elements, but I have nfi what they are for... -->
>       </foreign-key-field>
>     </foreign-key-fields>
>   </ejb-relationship-role>
>
>   </foreign-key-mapping>
>
>   </ejb-relation>
> </relationships>
> --
>
> Also, the nfi-comment about property elements makes no sense for me.
>
> Christopher
> --
> .Digital.Yearning.for.Networked.Assassination.and.Xenocide
>
> _______________________________________________
> Xdoclet-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/xdoclet-user


_______________________________________________
Xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to