Hi all,
We're using HibernateTools 3.2.4.Beta1.
Because of some historic stuff, we need to reverseengineer *.hbm.xml and pojo's from a MS SQL DB.
We generate everthing with the ant task, provided by the hibernate tools
The default behaviour of hbm2java task is to generate one class per table.
What we need is a abstract class with all getter/setter of the table and a concrete subclass of the abstract class. (Like the EclipseTools with velocity) e.g.:
Code:
public abstract AbstractUser extends BaseObject{
public String getUser() {...}
public void setUser(String user) {...}
}
public User extends AbstractUser {
// my Custom Code
}
The BaseObject is no problem (added following to the hibernate.reveng.xml)
Code:
<table-filter match-name=".*">
<!-- add any global meta attributes for tables here -->
<meta attribute="extends">BaseObject</meta>
</table-filter>
But how can we achieve the automatic generation of Abstract-Class and the concret class for each table/view ?
We have more then 300 tables, so we can't configure each table manually
Thanx
Jürgen