Dear all,
I'm using the below Ant configuration to run the hibernate reverse engineering on a Microsoft SQL Server 2005 database.
I ran into a problem, which I think is due to replication on the database.
Replication adds a column named "msrepl_tran_version" to each table in the database. Sometimes, if Hibernate detects a table is only used to link two other tables, it does not create a mapping for it, which I like.
However, because of the addition of the "msrepl_tran_version" column, I suspect that Hibernate changed this decision, and now generated different mapping files ! Which means some of my code is broken as well.
I could of course change the code, but, can I also make Hibernate ignore this column (preferably for all tables)? I tried the following, which did not work:
Code:
<table name="TESTTABLE">
<column name="msrepl_tran_version" exclude="true" />
</table>
The msrepl_tran_version was still there in the mapping file.
Thanks !
Jonne.
Code:
<hibernatetool destdir="${src.java.dir}">
<jdbcconfiguration
propertyfile="${basedir}/myp.db.properties"
revengfile="${basedir}/myp.reveng.xml"
reversestrategy="nl.myp.hibernate.reveng.MypReverseEngineeringStrategy"/>
<hbm2hbmxml/>
<hbm2cfgxml/>
</hibernatetool>
[hibernatetool] INFO: Hibernate Tools 3.2.1.GA
[/code]