jvanzyl 02/03/12 20:53:18
Modified: src/templates/sql/base/hypersonic primarykey.vm table.vm
Log:
Fixing the primary key generation so that the testbed passes with
the hsqldb profile. The primary key template was being output even if
the table had no primary key which was making the testbed choke on the
operations on the table that has no primary key.
Revision Changes Path
1.2 +2 -0
jakarta-turbine-torque/src/templates/sql/base/hypersonic/primarykey.vm
Index: primarykey.vm
===================================================================
RCS file:
/home/cvs/jakarta-turbine-torque/src/templates/sql/base/hypersonic/primarykey.vm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- primarykey.vm 2 Aug 2001 05:08:39 -0000 1.1
+++ primarykey.vm 13 Mar 2002 04:53:18 -0000 1.2
@@ -1 +1,3 @@
+#if ($table.hasPrimaryKey())
PRIMARY KEY($table.printPrimaryKey()),
+#end
1.2 +2 -2
jakarta-turbine-torque/src/templates/sql/base/hypersonic/table.vm
Index: table.vm
===================================================================
RCS file:
/home/cvs/jakarta-turbine-torque/src/templates/sql/base/hypersonic/table.vm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- table.vm 2 Aug 2001 05:08:39 -0000 1.1
+++ table.vm 13 Mar 2002 04:53:18 -0000 1.2
@@ -10,8 +10,8 @@
##set ( $fk = $generator.parse("$basepath/foreignkey.vm", "", "table", $tbl) )
#set ( $unique = $generator.parse("$basepath/unique.vm", "", "table", $tbl) )
#set ( $index = $generator.parse("$basepath/index.vm", "", "table", $tbl) )
-#if($strings.allEmpty([$pk,$unique]))$strings.chop($cols,1)#else$cols#end
-#if($strings.allEmpty([$unique]) && $pk.length()>0)$strings.chop($pk,2)#else$pk#end
+#if($strings.allEmpty([$pk,$fk,$unique,$index]))$strings.chop($cols,2)#else$cols#end
+#if($strings.allEmpty([$fk,$unique,$index]) &&
$pk.length()>0)$strings.chop($pk,2)#else$pk#end
##if($strings.allEmpty([$unique,$index]) && $fk.length()
>0)$strings.chop($fk,2)#else$fk#end
#if($unique.length()>0)$strings.chop($unique,2)#else$unique#end
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>