我有一堂课
class A {
String aField;
String bField;
}
class B {
A classAField
}
我使用限制来构建 HQL
Restrictions.like(propertyName, obj);
我用 oracle sql 函数括起来的 propertyName 以删除所有空格,所以 propertyName 是
replace(classAField.aField,' ')
我收到以下错误
could not resolve property: replace(classAField of: B; nested exception is org.hibernate.QueryException: could not resolve property: replace(classAField of: B
hiberante 无法识别 pl/sql 函数。我使用 oracle 10g 方言
<prop key="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</prop>
is there a work around here?
非常感谢