Hello
Hibernate tools: org.hibernate.eclipse_3.2.0.beta8
I would like to replace part describing primary key in hbm.xml file generated by hbm2hbmxml ant task. It looks like that:
Code:
<id name="id" type="big_decimal">
<column name="ID" precision="22" scale="0" />
<generator class="assigned" />
</id>
But there is a sequence in database, and i want to use that sequence. So i decided to describe that in reveng.xml file. My file looks like that:
Code:
<hibernate-reverse-engineering>
<schema-selection match-schema="SCHEMA" match-table="MYTABLE" />
<table name="MYTABLE">
<primary-key>
<generator class="sequence">
<param name="sequence">mytable_seq</param>
</generator>
<key-column name="ID" />
</primary-key>
</table>
</hibernate-reverse-engineering>
But that doesn't work at all. Generated hbm.xml file is still the same.
My ant task:
Code:
<target name="generate-mappings-classes">
<hibernatetool destdir="${dest-dir}" >
<jdbcconfiguration configurationfile="resource/ant/dev.cfg.xml"
revengfile="resource/ant/hibernate.reveng.xml"/>
<hbm2hbmxml />
<hbm2java />
</hibernatetool>
</target>
Did anyone face a problem like described?
Looks for me like a bug :(. I hope this is my fault, is it?
Thank you for any help
vitor_b