Hi,

If you use Torque to generate sql for a schema with more than 10 tables and you also 
have a second schema
(like the turbine-schema), the id-table-init code for the second schema will generate 
unique key violation
errors when inserting files into the database. This is due to a hardcoded value of 10 
in the Control.vm
template which ignores the actual number of id-table entries generated for the 
previous schema

Judging from the code it seems like someone expected the global $initialID counter to 
be updated from the
parsed db specific file, which doesn't happen.

I can think of two solutions....
1) setting the hardcoded 10 value to a higher constant (100 ?)
2) performing a second #foreach in the Control.vm to increase the counter by the 
actual number of tables in
the schema it just parsed.

Option 2) could be simplified more if someone can tell me how to get the length of an 
array
($dataModel.database.tables) in Velocity. I've never been able to find out how to do 
that :(

Age



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

Reply via email to