-->
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.  [ 3 posts ] 
Author Message
 Post subject: HQL required for this query
PostPosted: Fri May 21, 2004 8:06 pm 
Newbie

Joined: Fri May 21, 2004 8:02 pm
Posts: 4
Hi,

I am new to hibernate. Can any one please give m e the HQL equivalent for this query. This is DB2 AS400 query.(um_forum and um_topic are the table names)

select a.muuid,a.forum_name,count(b.muuid) topics,sum(b.topic_noposts) posts,a.createddate from um_forum a left outer join um_topic b on b.forum_id = a.muuid group by a.muuid,a.forum_name,a.createddate order by a.forum_name,a.createddate desc


Thanks and Regards,
Umar


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 21, 2004 8:49 pm 
Newbie

Joined: Fri May 21, 2004 8:02 pm
Posts: 4
Hi,

Can any one help on this..?


UMAR


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 07, 2004 2:07 am 
Beginner
Beginner

Joined: Tue Mar 30, 2004 5:54 am
Posts: 22
Location: Bangalore
Umar

HQL uses objects, not relational tables, unless u use SQLQuery(which is not recommended). so provoide ur mapping and objects. Also read this

When asking questions, give at least:
    the Hibernate version
    your mapping documents
    the Java code between sessionFactory.openSession() and session.close()
    the full stack trace of any exception that occurs
    the name and version of the database you are using
    a debug level Hibernate log excerpt is also appreciated

_________________
Thanks
Irfani


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.