This XDoclet results in 1:m with relation table mapping (on my machine).
And it is in fact broken at the moment.
True m:n works fine for me.

Here is an example of unidirectional m:n
   /**
    * @ejb.interface-method
    * @ejb.relation
    *    name="B-C"
    *    role-name="B-has-Cs"
    *    target-ejb="C"
    *    target-role-name="C-belongsto-B"
    *    target-multiple="true"
    * @jboss.target-relation
    *    related-pk-field="id"
    *    fk-column="C_FK"
    * @jboss.relation
    *    related-pk-field="id"
    *    fk-column="B_FK"
    * @jboss.relation-table
    *    table-name="B_C"
    *    datasource="${ds.name}"
    *    datasource-mapping="${ds.mapping}"
    *    create-table="${jboss.create.table}"
    *    remove-table="${jboss.remove.table}"
    */

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Heinz-Dieter Conradi
> Sent: Thursday, March 18, 2004 11:22 AM
> To: [EMAIL PROTECTED]
> Subject: [JBoss-user] cmr bug in 3.2.4RC1?
> 
> when updating form jboss-3.2.3 to jboss-3.2.4RC1 i noticed 
> that one of my JUnit tests failed. the test is about a m-n 
> relation which is managed by a relation table.
> 
> looking at the debugging output it appears that after the 
> setter method for the set no insert method is called. this is 
> what was in 3.2.3:
> 
> 2004-03-17 08:47:05,698 DEBUG
> [org.jboss.ejb.plugins.cmp.jdbc.JDBCInsertRelationsCommand.Ins
> titution]
> Executing SQL: INSERT INTO T_A_CONTACT(s_b_id,s_b_id) VALUES (?, ?)
> 2004-03-17 08:47:05,699 DEBUG
> [org.jboss.ejb.plugins.cmp.jdbc.JDBCInsertRelationsCommand.Ins
> titution]
> Rows affected = 1
> 2004-03-17 08:47:05,699 DEBUG
> [org.jboss.ejb.plugins.cmp.jdbc.JDBCInsertRelationsCommand.Ins
> titution]
> Rows affected = 1
> 
> but it missing in 3.2.4RC1.
> 
> is this a regressin bug in jboss. or i am doing something stupid.
> 
> tia, heinz-dieter conradi
> 
> 
> 
> ps: the bean is unidirectional is the code looks as follows:
> 
> public abstract class ABean implements EntityBean {
>     [...]
> 
>     /**
>      * @ejb.interface-method view-type="local"
>      *
>      * @ejb.relation
>      *      name="A-AContact"
>      *      role-name="A-has-AContacts"
>      *      target-ejb="B"
>      *      target-role-name="B-is-an-AContact"
>      *
>      * @jboss.relation-mapping style="relation-table"
>      *
>      * @jboss.relation-table
>      *        table-name="t_a_contact"
>      *
>      * @jboss.target-relation
>      *        fk-constraint="${fk-constraint}"
>      *        related-pk-field="aId"
>      *        fk-column="s_a_id"
>      *
>      * @jboss.relation
>      *        fk-constraint="${fk-constraint}"
>      *        related-pk-field="bId"
>      *        fk-column="s_b_id"
>      */
>     public abstract Set getAContacts();
> 
>     /** @ejb.interface-method view-type="local" */
>     public abstract void setAContacts(Set aContacts);
> 
>    [...]
> }
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials Free 
> Linux tutorial presented by Daniel Robbins, President and CEO 
> of GenToo technologies. Learn everything from fundamentals to 
> system 
> administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
> 
> 


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to