Well after toiling throught the spec I think the best way to add the
relations code is to add the tags at the method level.
Something like
OrderEJB
/**
@ejb:relation name="Order-LineItem" multiplicity="One"
*/
public abstract Collection getLineItems();
and in LineItemEJB
/**
@ejb:relation name="Order-LineItem" multiplicity="Many"
cascade-delete="true"
*/
public abstract int getOrderId();
to generate
<ejb-relation>
<ejb-relation-name>Order-LineItem</ejb-relation-name>
<ejb-relationship-role>
<multiplicity>One</multiplicity>
<relactionship-role-source>
<ejb-name>OrderEJB</ejb-name>
</relactionship-role-source>
<cmr-field>
<cmr-field-name>lineItems</cmr-field-name>
<cmr-field-type>java.util.Collection</cmr-field-type>
</cmr-field>
</ejb-relationship-role>
<ejb-relationship-role>
<multiplicity>Many</multiplicity>
<cascade-delete/>
<relationship-role-source>
<ejb-name>LineItemEJB</eib-name>
<relationship-role-source>
<cmr-field>
<cmr-field-name>orderId</cmr-field-name>
</cmr-field>
</relationship-role-source>
</ejb-relation>
Now there are two problems
1) I need to be able to keep a list of relation tags so I can look up
the other side of the relation and then I need to remove both of them
from the list when I am done. Otherwise each entry will be in there twice
2) I need to add the option unidirect-ejbname so if it is a
unidircetional relationship I don't go looking for the matching class.
I am still tracking down all of the jboss tags but the key ones will be
eager and lazy loading as well as table name definition for many to many
and uni-directional 1 to many relations.
So ...
Comments? If I go ahead with this I need some direction on how to add
the relation list and any other relative bits ....
_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/xdoclet-devel