-->
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: Converting hql to sql
PostPosted: Tue Sep 30, 2008 12:13 pm 
Newbie

Joined: Tue Sep 30, 2008 12:10 pm
Posts: 1
Hi all, i've a problem regarding knowing the recordcount of a select: i would know the count of records performing a "SELECT COUNT(*) FROM (hqlquery) ),
but when i surround a hql query by a select count(*) , hibernate fires an error ("unexpeted token....).
So my idea is to convert first the hql query definition into the corresponding sql definition /*BEFORE*/ hibernate executes the hql, in order to calculate (in sql) the count of records of a query.
How can i translate hql definition to sql defintion? there is some hibernate class helper?
Best regards


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.