db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Leggett <minf...@sharp.fm>
Subject OM compile failure: TABLE_NAME defined twice
Date Fri, 25 Apr 2003 14:45:08 GMT
Hi all,

Torque generates my OM classes, but they fail to compile like so:

java:compile:
     [javac] Since fork is true, ignoring compiler setting.
     [javac] Compiling 169 source files to 
/home/sam/minfrin/src/fma/patricia-db/target/classes
     [javac] Since fork is true, ignoring compiler setting.
     [javac] 
/home/sam/minfrin/src/fma/patricia-db/src/java/za/co/fma/patricia/database/om/BaseIdTablePeer.java:64:

TABLE_NAME is already defined in 
za.co.fma.patricia.database.om.BaseIdTablePeer
     [javac]     public static final String TABLE_NAME;
     [javac]                                ^
     [javac] 
/home/sam/minfrin/src/fma/patricia-db/src/java/za/co/fma/patricia/database/om/BaseIdTablePeer.java:73:

cannot assign a value to final variable TABLE_NAME
     [javac]     TABLE_NAME = "ID_TABLE.TABLE_NAME";
     [javac]     ^
     [javac] 2 errors

I suspect the problem is related to the following bit of my database 
schema definition:

   <table name="ID_TABLE">
     <column name="ID_TABLE_ID" required="true" primaryKey="true" 
type="INTEGER"/>
     <column name="TABLE_NAME" required="true" size="255" type="VARCHAR"/>
     <column name="NEXT_ID" type="INTEGER"/>
     <column name="QUANTITY" type="INTEGER"/>

     <unique>
       <unique-column name="TABLE_NAME"/>
     </unique>

   </table>

The above table is defined inside my database-schema.xml file - is this 
the correct thing to do? The docs are a little vague on how the whole 
auto sequence generation works, and exactly how you set it up.

Regards,
Graham
-- 
-----------------------------------------
minfrin@sharp.fm		"There's a moon
					over Bourbon Street
						tonight..."


Mime
View raw message