I have created a new class to customize the default ReverseEngineeringStrategy.
I am specifying the full name of the new class in the "Hibernate Code Generation" configuration of Eclipse but unfortunately i don't see any affect of it.
Do you have any idea about the problem? What should i check?
Custom ReverseEngineeringStrategy class that i use is as follows:
Code:
public class MyReverseEngineeringStrategy extends DelegatingReverseEngineeringStrategy {
/**
* Constructor
*
* @param delegate {@link org.hibernate.cfg.reveng.ReverseEngineeringStrategy}
*/
public MyReverseEngineeringStrategy(ReverseEngineeringStrategy delegate) {
super(delegate);
}
public String columnToPropertyName(TableIdentifier table, String column) {
if(column.endsWith("PACK_ID")) {
return "PACKNUMBER";
} else {
return super.columnToPropertyName(table, column);
}
}
}