db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Eade <se...@backstagetech.com.au>
Subject Re: Foreign-Key Problem
Date Thu, 16 Oct 2003 09:40:41 GMT
Your question would be best addressed on the turbine users mailing
list - turbine-user@jakarta.apache.org.  I see that you attempted
to cross post, but you got the domain name wrong (BTW: please don't
cross post :-)

The answer you seek can be found here:
The content of this document relates to Turbine 2.2.  I strongly
recommend moving to Turbine 2.3 if at all possible since it is
much much easier to do this kind of thing.  The page for T2.3 is
(the link near the top of extend-user-howto is fixed in cvs, but
waiting for the site to be republished).

Good luck.


Scott Eade
Backstage Technologies Pty. Ltd.

David_Solbach/MR/de/DadeInt@dadebehring.com wrote:

>I have the following Problem with my turbine-project (fcar):
>in <WEB-INF/conf/turbine-schema.xml> I have:
><Database name=turbine>
><table name="TURBINE_USER" idMethod="idbroker">
>    <column name="USER_ID" required="true" primaryKey="true" 
>    <column name="LOGIN_NAME" required="true" size="32" type="VARCHAR"/>
>    <column name="PASSWORD_VALUE" required="true" size="32" 
>    <column name="FIRST_NAME" required="true" size="99" type="VARCHAR"/>
>    <column name="LAST_NAME" required="true" size="99" type="VARCHAR"/>
>    <column name="EMAIL" size="99" type="VARCHAR"/>
>    <column name="CONFIRM_VALUE" size="99" type="VARCHAR"/>
>    <column name="MODIFIED" type="TIMESTAMP"/>
>    <column name="CREATED" type="TIMESTAMP"/>
>    <column name="LAST_LOGIN" type="TIMESTAMP"/>
>    <column name="OBJECTDATA" type="VARBINARY"/>
>    <unique>
>        <unique-column name="LOGIN_NAME"/>
>    </unique>
>and in <fcar-schema.xml> :
><database name="fcar">
>  <table name="FCAR_ADDRESS" idMethod="idbroker">
>    <column name="ADDRESS_ID" required="true" primaryKey="true" 
>    <column name="USER_ID" required="true" type="INTEGER"/>
>    <column name="STREET" size="255" type="VARCHAR"/>
>    <column name="NR" type="INTEGER"/>
>    <column name="CITY" size="255" type="VARCHAR"/>
>    <column name="PLZ" type="INTEGER"/>
>   <foreign-key foreignTable="TURBINE_USER">
>      <reference local="USER_ID" foreign="USER_ID" />
>    </foreign-key> 
>  </table>
>ant init now tells me:
>[torque-sql] Using contextProperties file: 
>[torque-sql] Using classpath
>[torque-sql] Generating to file 
>[torque-sql] Resolver: used database.dtd from 
>org.apache.torque.engine.database.transform package
>[torque-sql] Resolver: used database.dtd from 
>org.apache.torque.engine.database.transform package
>[torque-sql] Resolver: used database.dtd from 
>org.apache.torque.engine.database.transform package
>!! --> [torque-sql] ERROR!! Attempt to set foreign key to nonexistent 
>table, TURBINE_USER! 
>Generation failed. For more information consult the velocity log, or 
>invoke ant with the -debug flag.
>Of course, it's another Database-name for Torque, but isn't that kind of 
>cross referencing possible, or is there a good workaround? Because I'd 
>very much like to use Turbine's user/permission management capabilities 
>directly in my application, where I might have a lot of tables, that need 
>FK's to entries in the turbine-tables.
>Thank you,

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

View raw message