db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Berman <breitm...@yahoo.com>
Subject Foreign Key Problems
Date Mon, 22 Dec 2003 20:19:15 GMT
I'm currently using Torque 3.1. 

I have the following schema:

<database
  name="bookstore"
  defaultIdMethod="none">

    <table name="MASTER">
        <column name="C1" primaryKey="true"
required="true"
            size="32" type="VARCHAR"/>
        <column name="C2" primaryKey="true"
required="true"
            size="32" type="VARCHAR"/>
    </table>
    <table name="DETAIL">
        <column name="R1C1" primaryKey="true"
            required="true" size="32" type="VARCHAR"/>
        <column name="R1C2" primaryKey="true"
required="true"
            size="32" type="VARCHAR"/>
        <column name="R2C1" primaryKey="true"
            required="true" size="32" type="VARCHAR"/>
        <column name="R2C2" primaryKey="true"
required="true"
            size="32" type="VARCHAR"/>
        <foreign-key foreignTable="MASTER">
            <reference foreign="C1" local="R1C1"/>
            <reference foreign="C2" local="R1C2"/>
        </foreign-key>
        <foreign-key foreignTable="MASTER">
            <reference foreign="C1" local="R2C1"/>
            <reference foreign="C2" local="R2C2"/>
        </foreign-key>
    </table>
</database>

I'm able to build the java files without problems.
However, when I then complile the java files (via ant
-f build-torque.xml compile) I receive compilation
errors like the following:

    [javac]
/home/mhberman/torque-gen-3.1/src/java/com/kazmier/dm/BaseMaster.jav
a:132: cannot resolve symbol
    [javac] symbol  : variable
collDetailsRelatedByR2c2
    [javac] location: class com.kazmier.dm.BaseMaster
    [javac]                
((Detail)collDetailsRelatedByR2c2.get(i))


The problem only occurs under the following
conditions:

- Multiple 1-M relationships between master and the
same detail table.
The master table primary key has more than one column.

Any ideas?

Thx,
Marc

__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message