Hibernate version: 3.0.5
Hibernate tools version: current cvs from yesterday
Just want to tell you guys and max how the templatepaths in
the hibernatetools task work.
Here is the code from ant:
Code:
<hibernatetool destdir="${project.dir}/exp">
<jdbcconfiguration
configurationfile="${project.dir}/tstdata/ant/erk/hibernate.cfg.xml"
revengfile="${project.dir}/tstdata/ant/erk/hibernate.reveng.xml"/>
<cfg2hbm/>
<hbm2java templatespath="${project.dir}/tstdata/ant/erk"/>
</hibernatetool>
It will do this:
1. open a connection to my database
2. get a list of all tables
3. generate hbm files using the reveng file
4. generate java class using the velocity file pojo/javaclass.vm
this has to be below the templatepath here: ${project.dir}/tstdata/ant/erk
If you are content with defaults you do not need templatepath and reveng files. The default pojo/javaclass.vm is in hibernatetools.jar
thats really a fine tool!
@max: can you add some lines to doc? there is no hint about templatepath expecting a velocity file in pojo/javaclass.vm.