我有以下代码:
String SQL_QUERY ="Select abstractDesc from article";
Query query = session.createSQLQuery(SQL_QUERY);
Object [] amount = (Object []) query.uniqueResult();
out.println("mean amount: " + amount[0]);
但我收到以下错误:
Hibernate:从文章查询中选择 abstractDesc 没有返回唯一结果:10
如何解决此问题以执行查询并正确打印结果?