Java-Hibernate-Newbie: How do I acces the values from this list?
Posted
by Mes
on Stack Overflow
See other posts from Stack Overflow
or by Mes
Published on 2010-04-13T21:59:58Z
Indexed on
2010/04/13
22:03 UTC
Read the original article
Hit count: 146
I have this class mapped
@Entity
@Table(name = "USERS")
public class User {
private long id;
private String userName;
}
and I make a query:
Query query = session.createQuery("select id, userName, count(userName) from User order by count(userName) desc");
return query.list();
How can I acces the value returned by the query?
© Stack Overflow or respective owner