zoukankan      html  css  js  c++  java
  • Hibernate 问题,在执行Query session.createQuery(hql) 报错误

    在配置文件中加入

    <prop key="hibernate.query.factory_class">org.hibernate.hql.internal.classic.ClassicQueryTranslatorFactory</prop> 

    加入之后不能更新删除,不加不能使用代参查询(好烦躁,有知道怎么样的可以留言告诉我,谢谢啦)。

    (1)使用 Hibernate3 的查询翻译器: 
        hibernate.query.factory_class= org.hibernate.hql.ast.ASTQueryTranslatorFactory
    (2)使用 Hibernate2 的查询翻译器: 
        hibernate.query.factory_class= org.hibernate.hql.classic.ClassicQueryTranslatorFactory
       
     20160707更新
    hql语句使用占位符查询,struts中antlr-2.7.2与hibernate中antlr-2.7.7冲突,删除2.7.2
      windows-preferences搜索struts remove掉antlr-2.7.2,还有tomact中部署包里的,最后删掉重新部署
     
    也可参照:http://blog.csdn.net/archer119/article/details/50461134
     
     
     
     
  • 相关阅读:
    css
    js -【 数组】判断一个变量是数组类型的几种方法
    【消灭代办】第2周
    【本周面试题】第2周
    【本周面试题】第1周
    【消灭代办】第1周
    echarts
    css
    js
    JS方法
  • 原文地址:https://www.cnblogs.com/liangbo-/p/5151960.html
Copyright © 2011-2022 走看看