Just for information, Torque Gen uses Velocity templates to generate the SQL specific to each database. It is possible to customize these templates in case they are not doing what we need them to. Depending on whether the customization is generic or not, it might even be a good idea to submit this back to the Torque Gen project (I have done this before when I noticed problems with the generation of HSQL code).
Regards, Serge Huber.
Chris Custine wrote:
Is anyone aware of the problems with using the BIT type with Torque Gen when targetting Postgres as the DB? I have noticed the addition of a bunch of BIT types in the security tables and some of the prefs tables and they are really a pain to work around if you use Postgres.
I don't know what the correct solution is, but a Torque Gen BIT type maps to a boolean in Postgres, which does not allow 0 or 1 as values which is what the sql scripts have. My initial solution was to change the 0 and 1 values in the sql scripts into true or false and that worked for a while until some of the recent updates to security. The best fix I have right now is to edit the db.props file within the torque-gen jar file and map BIT=int2. This works except in populate-userinfo-for-default-psml.sql the inserts into PREFS_PROPERTY_VALUE are using the boolean true and false syntax instead of 0 or 1 like everything else using BIT.
Obviously this is a bigger issue than Jetspeed but I have no earthly
idea if anything in Torque is going to resolve this. Would it be
possible to get a resolution here and at least fix resolve it within
Jetspeed? I think the choices are:
* Use a different type in Torque that works across all the DBs or
* Provide a patched Torque gen jar in the Jetspeed specific
repository with the BIT type mapped to int2 and agree to always use
the 0 or 1 values for these columns instead of true/false
If anyone else is using Postgres and I am missing something please let me know, this is a real pain in the ass :-)
Thanks, Chris
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]