You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Jason Grant <ja...@logular.com> on 2001/03/28 23:48:22 UTC
$tstrings references in generated SQL scripts
Hi,
I've written an application under TDK1a11, and am now trying to migrate it
to a version of turbine/TDK just pulled from CVS. When I build my app with
the "init" target, some of the generated SQL contains $tstrings references,
so I assume that the templating is out of whack. This is no doubt my own
fault, as I'm trying to salvage my ant config. Here's what I've done:
* built turbine, and copied jars across to my lib dir, killing off stale
ones
* updated my build-project.xml file with the new taskdefs, and targets
* copied the new *.vm hierachy to my build hierachy
Alas, id-table-schema.sql comes out like this:
--------------------------------------------------------------------------
-- ID_TABLE
--------------------------------------------------------------------------
drop table if exists ID_TABLE;
CREATE TABLE ID_TABLE
(
$tstrings.sub($tstrings.collapseSpaces($entry)," ,",",")
$tstrings.sub($tstrings.collapseSpaces($entry)," ,",",")
$tstrings.sub($tstrings.collapseSpaces($entry)," ,",",")
$tstrings.sub($tstrings.collapseSpaces($entry)," ,",",")
PRIMARY KEY(ID_TABLE_ID),
UNIQUE (TABLE_NAME)
);
--------------------------------------------------------------------------
I assume that this is because "columns.vm" isn't working (I'm using mysql),
but am unsure of the fix. Suggestions appreciated.
J.
--------------------------------------------------------------------------
Here is my taskdef and target, if it helps:
--------------------------------------------------------------------------
<taskdef name="torque-sql" classname="org.apache.turbine.torque.TorqueSQLTask">
<classpath refid="classpath"/>
</taskdef>
<target name="turbine-id-table-sql">
<echo message="+------------------------------------------+"/>
<echo message="| |"/>
<echo message="| Generating SQL for YOUR Turbine project! |"/>
<echo message="| Woo hoo! |"/>
<echo message="| |"/>
<echo message="+------------------------------------------+"/>
<torque-sql
controlTemplate="${SQLControlTemplate}"
outputDirectory="${outputDirectory}/sql"
templatePath="${templatePath}"
outputFile="id-table-schema.sql"
xmlFile="${schemaDirectory}/id-table-schema.xml"
targetDatabase="${database}"
/>
</target>
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org