| Author |
Message |
|
2006/10/13 01:51
|
|
|
jvence
Joined: 2005/09/15
Messages: 17
Offline
|
|
|
|
What is the best way to retrieve the results COUNT of a query that was performed using the generated Criteria or Factory classes?
Jean
|
|
|
|
 |
| |
|
2006/10/13 01:52
|
|
|
jvence
Joined: 2005/09/15
Messages: 17
Offline
|
|
|
|
What is the best way to retrieve the results COUNT of a query that was performed using the generated Criteria or Factory classes? Is there anyway to do this without loading everything into an array using the 'list' functions.
Jean
|
|
|
|
 |
| |
|
2006/10/13 15:29
|
|
|
Jick
Joined: 2005/04/29
Messages: 2880
Offline
|
|
|
|
Hi jvence,
Now you can get the count from the list or write the query directly.
Best regards,
Jick
|
Visual Paradigm International Ltd.
http://www.visual-paradigm.com
Build Quality Applications Faster, Better and Cheaper |
|
|
|
 |
| |
|
2006/10/19 11:22
|
|
|
fucku
Joined: 2006/10/19
Messages: 1
Offline
|
|
|
|
String HQL = "select count(*) from User"
Quey query = session.createQuery(HQL);
query.execute();
then get the count result
easy. try more don't depend on the DBVA. Maybe use Spring + Hibernate
|
|
|
|
 |
| |