I have a table has 300 columns I want to make get a POJO from the table through reverse engineering using Eclipse - Hibernate tools. I don't want all columns exist in the generated POJO.
The problem is that there are too many columns so I need to specify all the columns names in the hibernate.reveng.xml file to exclude many of them.
I know how to exclude each column using the below tag inside the hibernate.reveng.xml file.
<table name="PEOPLE">
<column name="REG_CODE" exclude="true"/>
..... <!-- around 300 lines to exclude unnecessary columns -->
</table>
Before typing in(or copy and paste from a generated .hbm.xml file) all the column names, I wonder there is any easy way to exclude unnecessary columns from the generated POJO.
I got a hint from the official Hibernate document from JBOSS site about using org.hibernate.cfg.reveng.DelegatingReverseEngineeringStrategy.
Could anyone please share your experience with me?
Thank you in advance.