You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Todd Carmichael <to...@concur.com> on 2003/10/01 01:48:32 UTC

Torque 3.1, Control.vm, and removal of IF ($TARGETDATABASE)

I have been slowing trying to upgrade to Torque 3.1.  One of the problems I
faced was a result of a change to the om/Control.vm file .  In our build
scripts of  the object model (org.apache.torque.task.TorqueDataModelTask), I
was getting an error in the velocity log stating the $targetDatabase was
undefined.   The old Control.vm file had the following syntax:

#if ($targetDatabase)
   #set ( $dbprops = $properties.load("sql/base/$targetDatabase/db.props") )
#end

The new one for 3.1 is as follows:

targetdatabase = $targetDatabase
#set ( $dbprops = $properties.load("sql/base/$targetDatabase/db.props") )
dbprops.idMethod = $dbprops.get("idMethod")
#include ( "sql/base/$targetDatabase/db.props" )

Our build scripts were not setting this value because during object model
creation we should not need to know the database type.  So I have added this
check back in the if check for $targetdatabase.  What was the reason this
was changed?

Thanks.

ToddC