db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cedric.bra...@vallourec.fr
Subject Réf. : RE: foreign-key
Date Thu, 09 Jun 2005 12:48:47 GMT

Merci Bernard ;-)
                                    &&
                             Thanks Robert :-)



                                                                                         
                          
                    Robert                                                               
                          
                    Kromkamp              Pour :  'Apache Torque Users List' <torque-user@db.apache.org>
           
                    <r.kromkamp@pa        cc :                                        
                             
                    gelink.nl>            Objet :      RE: foreign-key                
                             
                                                                                         
                          
                    09/06/2005                                                           
                          
                    10:50                                                                
                          
                    Veuillez                                                             
                          
                    répondre à                                                         
                            
                    "Apache Torque                                                       
                          
                    Users List"                                                          
                          
                                                                                         
                          
                                                                                         
                          




Hi Cedric,

You have to specify the javaType in your schema, like:

<column name="NumeroService" type="INTEGER" javaType="object"/>

The javaType wil be a java.lang.Integer instead of a int (which can'n be
null)

Robert


-----Original Message-----
From: cedric.brajus@vallourec.fr [mailto:cedric.brajus@vallourec.fr]
Sent: donderdag 9 juni 2005 10:04
To: Apache Torque Users List
Subject: foreign-key



foreign-key wich can be null ?!?

My shema :

<table name="UTILISATEUR" idMethod="idbroker">
   ....
   <column name="NumeroService" type="INTEGER" />
   ...
     <foreign-key name="RelationUtilisateur2" foreignTable="SERVICE">
          <reference local="NumeroService" foreign="NumeroService" />
     </foreign-key>
</table>

I have tried :
     oUtilisateur.setNumeroservice(0);
          and
     oUtilisateur.setService(null);

But Torque want a reference in Service...
A solution is to remove the RelationUtilisateur2

Have you an other ?

Thanks Cedric



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

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






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