Hi,
I have a little problem with hibernate tools when I try to use my own naming strategy. When I use default naming strategy, evrything works fine.
Error:
org.hibernate.console.HibernateConsoleRuntimeException: Could not configure naming strategy br.com.tesystem.util.IMSNamingStrategy
Could not configure naming strategy br.com.tesystem.util.IMSNamingStrategy
java.lang.ClassNotFoundException: br.com.tesystem.util.IMSNamingStrategy
br.com.tesystem.util.IMSNamingStrategy
java.lang.ClassNotFoundException: br.com.tesystem.util.IMSNamingStrategy
br.com.tesystem.util.IMSNamingStrategy
My Class:
Code:
package br.com.tesystem.util;
import org.hibernate.cfg.reveng.DelegatingReverseEngineeringStrategy;
import org.hibernate.cfg.reveng.ReverseEngineeringStrategy;
import org.hibernate.cfg.reveng.TableIdentifier;
public class IMSNamingStrategy extends DelegatingReverseEngineeringStrategy {
public IMSNamingStrategy (ReverseEngineeringStrategy delegate) {
super(delegate);
}
@Override
public String columnToPropertyName(TableIdentifier table, String column) {
if (column.startsWith("ID")) {
return "id";
} else {
return super.columnToPropertyName(table, column);
}
}
}
Eclipse 3.3.2
Hibernate tools -3.2.2.Beta1 (downloaded today)
Thanks