出现该错误提示,说明在Hibernate配置文件,出现了问题。
我们写了一句普通的sql,却告诉Hibernate,利用Hibernate句法执行,自然会出现错误。
解决方案很简单:
<property name="sqlType"> <value type="...">HQL</value> </property>
改为
<property name="sqlType"> <value type="...">SQL</value> </property>
即可
<property name="sqlType"> <value type="...">HQL</value> </property>
<property name="sqlType"> <value type="...">SQL</value> </property>