Hi,

I wrote to the torque user list about this problem
(http://nagoya.apache.org/eyebrowse/ReadMsg?[EMAIL PROTECTED]&msgId=275952)
 but
nobody responded.

If you have two or more schema.xml files and one of them has more than 10 tables, the 
id-table sql generation
task generates incorrect (double) initial ids for tables in other schemas. This is 
because the maximum initial
id per schema has been hardcoded to 10.
I added another loop to the relevant Control.vm to set the $initialID variable to the 
correct value.

Can someone apply this patch ?

Age


Index: Control.vm
===================================================================
RCS file: 
/home/cvspublic/jakarta-turbine-torque/src/templates/sql/id-table/Control.vm,v
retrieving revision 1.4
diff -u -r1.4 Control.vm
--- Control.vm  27 Oct 2001 19:06:16 -0000      1.4
+++ Control.vm  17 May 2002 06:01:55 -0000
@@ -2,5 +2,7 @@
 #foreach ($dataModel in $dataModels)
 #set ( $outFile = "${dataModel.name}-idtable-init.sql" )
 $generator.parse($fname,"$outFile","tables",$dataModel.database.tables)
-#set ( $initialID = $initialID + 10 )
+#foreach ($table in $dataModel.database.tables)
+#set ($initialID = $initialID + 1)
+#end
 #end




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to