您好我正在尝试使用JBoss 7.1和Hibernate找到Oracle转换问题的解决方案(不接受"数字"为Double)。因此,最佳建议的解决方案是以这种方式制作自定义方言:
public class MyOracle10gDialect extends Oracle10gDialect {
public MyOracle10gDialect() {
super();
}
protected void registerNumericTypeMappings() {
super.registerNumericTypeMappings();
registerColumnType( Types.DOUBLE, "number" );
}}
在hibernate.cfg.xml中我添加了:
<property name="hibernate.dialect">com.d2i.sssim.hibercommun.MyOracle10gDialect</property>
但这就是我得到的:
org.hibernate.HibernateException:找不到方言类:com.d2i.sssim.hibercommun.MyOracle10gDialect
关于同一个项目,有hibernate连接。我真的应该用一个类(MyOracle10gDialect)创建另一个项目并将其作为lib包含在我的项目中吗?为什么hibernate.cfg.xml无法看到它自己的项目中的类?有什么帮助吗?