Hi,
how you guys select multiple rows from mysql database via hibernate?
I could select but I only able to get one row out of multiple rows.
int id = 1;
Query query = HibernateUtil.getSession().createQuery("select u from UcoopThread u where u.id = :id");
query.setInteger("id", id);
Collection<UcoopThread> q = (Collection<UcoopThread>) query.list();
The above select query should give me several rows but if I pint the collection content then I will only get one row.
I have also tried query.uniqueResult() , and I get the same result, any help?
Thanks for consideration.