Reputation: 491
I have the following code:
String SQL_QUERY ="Select abstractDesc from article";
Query query = session.createSQLQuery(SQL_QUERY);
Object [] amount = (Object []) query.uniqueResult();
out.println("mean amount: " + amount[0]);
but I get the following error:
Hibernate: Select abstractDesc from article query did not return a unique result: 10
How can I solve this to have the query executed and print the result properly?
Upvotes: 0
Views: 2339