While using the xdoclet ojb module (v1.0.0) I'm running into the same problem
as described in an older message from 2003 - see 
http://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED]&msgNo=7009.

Following the thread I found an response - but no solution... In resumption 
of this thread I append a short example with two classes and the resulting 
schemas. As you can see there are no foreign key in torque schema. BTW, i 
got no error messages from XDoclet. Maybe, I'm wrong, sorry for inconvenience.
 
Thanks in advance,
Thomas

-------
CLASSES
-------
/**
 * @ojb.class table="A"
 */
public class A {
    /**
     * @ojb.field column="ID" primarykey="true" autoincrement="ojb"      
     */
    private int id;
    /**
     * @ojb.collection element-class-ref="B" foreignkey="aId"
     */
    private Collection bs;
}

/**
 * @ojb.class table="B"
 */
public class B {
    /**
     * ojb.field column="ID" primarykey="true" autoincrement="ojb"
     */
    private int id;
    /**
     * @ojb.field name="aId" column="AID"
     */
    private int aId;
}
---------------
REPOSITORY_USER
---------------
<class-descriptor
    class="A"
    table="A"
>
    <field-descriptor
        name="id"
        column="ID"
        jdbc-type="INTEGER"
        primarykey="true"
        autoincrement="true"
    >
    </field-descriptor>
    </field-descriptor>
    <collection-descriptor
        name="bs"
        element-class-ref="B"
    >
        <inverse-foreignkey field-ref="aId"/>
    </collection-descriptor>
</class-descriptor>
<class-descriptor
    class="B"
    table="B"
>
    <field-descriptor
        name="aId"
        column="AID"
        jdbc-type="INTEGER"
    >
    </field-descriptor>
</class-descriptor>
-------------
TORQUE-SCHEMA
-------------
<database name="test">
    <table name="A">
        <column name="ID"
                javaName="id"
                type="INTEGER"
                primaryKey="true"
                required="true"
        />
    </table>
    <table name="B">
        <column name="ID"
                javaName="id"
                type="INTEGER"
                primaryKey="true"
                required="true"
        />
        <column name="AID"
                javaName="aId"
                type="INTEGER"
        />
    </table>
</database>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to