db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ludwig Magnusson" <lud...@itcatapult.com>
Subject Custom generation with standard templates
Date Sat, 06 Mar 2010 14:22:02 GMT
Hi!
I have studied the generator getting started page for torque 4 and the
concept reference. But I have a situation that I think is not mentioned
there, since that documentation is about building things from scratch.

What I want to do is use some of the standard components, more specific the
templates that generate tables, foreign keys and so on with specific source
elements (not an entire database schema).

If I have a SourceElement object corrensponding to this xml-element:

<table name="new_table">
  <column name="id" primaryKey="true" required="true" javaType="primitive"
type="INTEGER" />
  <column name="name" required="true" javaType="primitive" size="64"
type="VARCHAR" />
</table>

And I want to generate sql code unsing the standard table.vm template... How
much do I need to setup by myself and what standard components can I use?
I have looked at the code but I haven't quite figured out what components
(generator, controller, configuration) are used when generating sql-files.
/Ludwig



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message