-->
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.  [ 1 post ] 
Author Message
 Post subject: Accessing underlying SQL for Criteria
PostPosted: Sat Feb 26, 2005 9:19 pm 
Beginner
Beginner

Joined: Tue Nov 09, 2004 9:48 am
Posts: 23
Guys,

I would like to be able to count(*) the number of results from a Criteria query, without executing the query. I know there is a patch available to add count(), but I'd prefer to not go that route.

What might be nice is to be able to build the Critera, and then return the query is would use as a string. Then, I could simply string replace the SELECT FIELD1, FIELD2, etc, with SELECT count(*), then manually execute the Query.

Is there any way to do this? I've looked at the API docs and it doesn't look promising, but I hope one of you might be able to prove me wrong.

Thanks for the help!

Jbwiv


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

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.