Hello all,

I'm trying to model a M:N bidirectional relationship like so:

Author *<---->* Book

The CMR fields marked up with XDoclet tags are below:

/**
* @ejb.interface-method view-type="local"
* @ejb.relation name="Author_Book_Rel"
* role-name="this_authors_books"
*
* @weblogic.relation join-table-name="AUTHOR_BOOK_REL"
* @weblogic.column-map foreign-key-column="AUTHORID"
*             primary-key="ID"
*/
public abstract Collection getBooks();

/**
* @ejb.interface-method view-type="local"
* @ejb.relation name="Author_Book_Rel"
*         role-name="this_books_authors"
*
* @weblogic.relation join-table-name="AUTHOR_BOOK_REL"
* @weblogic.column-map foreign-key-column="ISBN"
*         primary-key="ISBN"
*/
public abstract Collection getAuthors();

This is what I get in the weblogic-cmp-rdbms-jar.xml file.  Notice the
values for the <key-column> elements have been switched between the two
sides of the relation.

<table-name>AUTHOR_BOOK_REL</table-name>
<weblogic-relationship-role>
    <relationship-role-name>this_authors_books</relationship-role-name>
    <relationship-role-map>
    <column-map>
        <foreign-key-column>AUTHORID</foreign-key-column>
        <key-column>ISBN</key-column>
    </column-map>
    </relationship-role-map>
</weblogic-relationship-role>
<weblogic-relationship-role>
    <relationship-role-name>this_books_authors</relationship-role-name>
    <relationship-role-map>
        <column-map>
            <foreign-key-column>ISBN</foreign-key-column>
            <key-column>ID</key-column>
        </column-map>
    </relationship-role-map>
</weblogic-relationship-role>

Am I not interpreting the usage of the tags properly or is this a bug?

I'm using XDoclet 1.2b2 and trying to deploy to Weblogic 7.0

thanks,

JK





-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to