wyang55
wyang55
2016-03-18 06:49

HQL中使用占位符查询mysql数据老是报错...

  • hql
  • mysql

执行语句如下:
Session session = HibernateUtil.getSession();
String hql = "from Category where name=?";
Query query = session.createQuery(hql);
query.setString(0, "饮品");
错误:
ava.lang.NoSuchMethodError: org.hibernate.hql.antlr.HqlBaseParser.recover(Lantlr/RecognitionException;Lantlr/collections/impl/BitSet;)V

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

4条回答

为你推荐

换一换