Eric,

For the XDoclet documentation for the WebLogic tags, take a look at the old docs:
http://xdoclet.sourceforge.net/olddocs/

Here's an example of a unidirectional many-to-many relationship for WebLogic between 
Object1 and Object2.  This code would be inside of Object1:

        /**
         * @ejb.interface-method
         * @ejb.relation        name="Object1-Object2" 
         *                                      role-name="Object1-has-Object2s"
         *                                      target-ejb="Object2"
         *                                      target-role-name="Object2-has-Object1s"
         *                                      target-multiple="yes"
         * @weblogic.relation join-table-name="object1_object2_link"
         * @weblogic.column-map key-column="object1_id" 
         *                                      foreign-key-column="object1_id"
         * @weblogic.target-column-map key-column="object2_id" 
         *                                      foreign-key-column="object2_id" 
         * 
         */
        public abstract Set getObject2s();

        /**
         * @ejb.interface-method
         */
        public abstract void setObject2s( Set object2s );

This assumes the following table structure:

object1
--------
object1_id int
more fields...

object2
--------
object2_id int
more fields...

object1_object2_link
--------------------
object1_id int
object2_id int


If you want a many-to-many bi-directional, just move the target tags over to the other 
bean.

>From what I've found, WebLogic is a little screwey in their many-to-many relationship 
>column mapping.  It seems backwards to me.  If that example doesn't work, I'd suggest 
>playing around with it a little bit.

- Adam

> -----Original Message-----
> From: Eric Chow [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, June 05, 2003 10:24 PM
> To: [EMAIL PROTECTED]
> Subject: [Xdoclet-user] WebLogic M-N mapping
> 
> 
> Hello,
> 
> 
> How to define M-N mapping in xdoclet for weblogic ?
> 
> 
> Eric
> 
> ==========================
> If you know what you are doing, 
> it is not called RESEARCH!
> ==========================
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by:  Etnus, makers of 
> TotalView, The best thread debugger on the planet. Designed 
> with thread debugging features you've never dreamed of, try 
> TotalView 6 free at www.etnus.com. 
> _______________________________________________
> xdoclet-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/xdoclet-user
> 


-------------------------------------------------------
This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to