hibernate3.0 的bug
from WyUsers b where 1=1 and b.userGrade like '%"+grade+"%'
grade 中文无法解析
只需要在配置文件中加入
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
org.hibernate.dialect.SQLServerDialect
</prop>
<!--加入的这句话 -->
<prop key="hibernate.query.factory_class">org.hibernate.hql.classic.ClassicQueryTranslatorFactory</prop>
</props>
</property>
问题解决...
from WyUsers b where 1=1 and b.userGrade like '%"+grade+"%'
grade 中文无法解析
只需要在配置文件中加入
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
org.hibernate.dialect.SQLServerDialect
</prop>
<!--加入的这句话 -->
<prop key="hibernate.query.factory_class">org.hibernate.hql.classic.ClassicQueryTranslatorFactory</prop>
</props>
</property>
问题解决...