db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mpoes...@apache.org
Subject cvs commit: jakarta-turbine-torque/src/templates/sql/base/hypersonic tablefk.vm foreignkey.vm
Date Thu, 05 Dec 2002 07:46:56 GMT
mpoeschl    2002/12/04 23:46:56

  Modified:    src/templates/sql/base/hypersonic tablefk.vm foreignkey.vm
  Log:
  i found that torque does not create the foreign keys defined
  in -schema.xml when using hsqldb.
  patch by Jakob Braeuchi <jbraeuchi@gmx.ch>
  
  Revision  Changes    Path
  1.2       +4 -0      jakarta-turbine-torque/src/templates/sql/base/hypersonic/tablefk.vm
  
  Index: tablefk.vm
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-torque/src/templates/sql/base/hypersonic/tablefk.vm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- tablefk.vm	2 Aug 2001 05:08:39 -0000	1.1
  +++ tablefk.vm	5 Dec 2002 07:46:56 -0000	1.2
  @@ -0,0 +1,4 @@
  +#set ( $fk = $generator.parse("$basepath/foreignkey.vm", "", "table", $tbl) )
  +#if ($fk.length()>0)$fk#end
  +
  +
  
  
  
  1.2       +3 -1      jakarta-turbine-torque/src/templates/sql/base/hypersonic/foreignkey.vm
  
  Index: foreignkey.vm
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-torque/src/templates/sql/base/hypersonic/foreignkey.vm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- foreignkey.vm	2 Aug 2001 05:08:39 -0000	1.1
  +++ foreignkey.vm	5 Dec 2002 07:46:56 -0000	1.2
  @@ -1,3 +1,5 @@
   #foreach ($fk in $table.ForeignKeys)
  -    FOREIGN KEY ($fk.LocalColumnNames) REFERENCES $fk.ForeignTableName ($fk.ForeignColumnNames),
  +    ALTER TABLE $table.Name
  +        ADD CONSTRAINT $fk.Name FOREIGN KEY ($fk.LocalColumnNames)
  +            REFERENCES $fk.ForeignTableName ($fk.ForeignColumnNames);
   #end
  
  
  

Mime
View raw message