IDE调试的时候获得sql:select * from Article a where 2 > 1 and a.createTime <= '2010-12-29'拿到 sql server 2005 执行,正确查询出结果,但hibernate执行出错,不解其意,望高手作答,多谢!
Session session = super.getSession().getSessionFactory().openSession();
Transaction ta = session.beginTransaction();
List articleList = new ArrayList();
articleList = (List) session.createQuery(sql).uniqueResult();
ta.commit();
session.close();
return articleList;
Session session = super.getSession().getSessionFactory().openSession();
Transaction ta = session.beginTransaction();
List articleList = new ArrayList();
articleList = (List) session.createQuery(sql).uniqueResult();
ta.commit();
session.close();
return articleList;
解决方案 »
- ssh连接oracle速度慢
- linux下定时自动运行JAVA程序
- org.springframework.beans.PropertyBatchUpdateException;
- 在线等,急。
- action如何获取集合
- 急!!!!!!!!!!
- 求 hibernate 的中文开发文档,书籍
- !!!!!!!!!JDBC2.0的问题,急!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- 想兼职的注意了!公司项目,找中关村附近JAVA开发高手兼职开发swing
- spring aop的问题
- JAVA如何扫描一个包下面的所有类,并加载到内存中去
- 关于代码重构,代码复用各位有什么好建议。
at org.hibernate.hql.ast.QuerySyntaxException.convert(QuerySyntaxException.java:31)
at org.hibernate.hql.ast.QuerySyntaxException.convert(QuerySyntaxException.java:24)
at org.hibernate.hql.ast.ErrorCounter.throwQueryException(ErrorCounter.java:59)
at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:258)
at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:157)
at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:111)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:77)