-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: How do you get the eqvivilent of a Row Count
PostPosted: Thu May 20, 2004 3:41 pm 
Beginner
Beginner

Joined: Tue May 11, 2004 10:21 am
Posts: 20
How would you write the statement in HSQL of:
rowCount = resultSet.getRow(); ?

TIA

Tom K.


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 20, 2004 3:51 pm 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
http://www.hibernate.org/hib_docs/refer ... ggregation

if your hql is "from Object"
just execute "slect count(obj) from Object as obj"

_________________
Anthony,
Get value thanks to your skills: http://www.redhat.com/certification


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 20, 2004 3:53 pm 
Newbie

Joined: Wed Mar 24, 2004 11:13 am
Posts: 15
Location: Norcross, GA
Check out the tips from Section 10.13 from the Hibernate docs.

If I understood your question right, One of the examples there maybe helpful to you.

Madhu


Top
 Profile  
 
 Post subject: How do you get the eqvivilent of a Row Count
PostPosted: Thu May 20, 2004 4:04 pm 
Beginner
Beginner

Joined: Tue May 11, 2004 10:21 am
Posts: 20
I need to return the count and would like to combine a command that I don't have combine with another one.

I suppose I could do as suggested and do a
session.find("select count(a) from AdInfoView as a");

and convert it to an int?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.