db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dressler, Erik(externe MA)" <Erik.Dress...@Dresdner-Bank.lu>
Subject RE: Table definition with double relation.... help me
Date Wed, 11 May 2005 09:24:39 GMT



> -----Original Message-----
> From:	cedric.brajus@vallourec.fr [SMTP:cedric.brajus@vallourec.fr]
> Sent:	11 May 2005 10:39
> To:	torque-user@db.apache.org
> Subject:	Table definition with double relation.... help me
> Importance:	High
> 
> How do we do in the xxx-schema.xml when a table calls another and
> conversely..
> A user can belong to a service
> A service has a person in charge
> Example :
> <table name="SERVICE" idMethod="idbroker">
>    <column name="NumeroService" primaryKey="true" type="INTEGER" />
>    <column name="NumeroResponsableService"  type="INTEGER"/>
>    <column name="NomService"  type="VARCHAR" size="50"/>
>      <foreign-key name="RelationService3" foreignTable="UTILISATEUR">
> 
	you have forgotten an "i"!!!! ;) it's a string!

	greetz, erik

>           <reference local="NumeroResponsableService" foreign=
> "NumeroUtilisateur"/>
>      </foreign-key>
> </table>
> 
> <table name="UTILISATEUR" idMethod="idbroker" description="Table gérant
> les
> utlisateurs de l'application">
>    <column name="NumeroUtilisateur" primaryKey="true" type="INTEGER" />
>    <column name="NumeroService" type="INTEGER" description="Référence à
> son
> service pour obtenir tout les droits rattachés à son service"/>
>    <column name="NomUtilisateur"  type="VARCHAR" size="50"/>
>      <foreign-key name="RelationUtilisateur2" foreignTable="SERVICE">
>           <reference local="NumeroService" foreign="NumeroService"/>
>      </foreign-key>
> </table>
> 
> Torque message :
> BUILD FAILED: ...\torque-gen-3.1\build-torque.xml:241:
> org.apache.torque.engine.EngineException: Attempt to define foreign key
> with nonexistent column in table, UTILISATEUR
> 
> 
> Thank you to answer me please
> I'm french and I hope that my english will be comprehensible...
> 
> BRAJUS Cedric
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
 
*  *  *  *  *  *  D I S C L A I M E R  *  *  *  *  *  *  *
 
This message is confidential and intended for the named addressee(s) only.
If you are not the intended recipient, please contact the sender by E-Mail
return and then delete this message from your system. You should not copy
or use it or disclose its contents to any other person.
 
If any part of this message is illegible or if you suspect that the message
may have been intercepted or amended, please contact the sender.
Dresdner Bank Luxembourg S.A. cannot accept any responsibility for the
accuracy or completeness of this message without further investigation.
 


---------------------------------------------------------------------
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