-->
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: Execute Complex SQL
PostPosted: Wed Jan 03, 2007 9:17 am 
Newbie

Joined: Tue Jan 02, 2007 8:13 am
Posts: 4
Hi,

How can I execute the following query using hibernate HQL/Criteria/Query?

select num from (select rownum num ,id from( select id,entity, severity,ttime from event order by severity asc, id asc))where id=1011799

I would like to execute this query by setting paramaters, projection ...etc and do not want to generate manully and give it toHibernate.

Any help is appreciated

Thanks
Venkat


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 03, 2007 10:02 am 
Newbie

Joined: Thu Nov 02, 2006 8:41 am
Posts: 13
Location: Argentina
read the hibernate reference in chapter 16

there ara a lot of examples for create queries


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 03, 2007 11:42 am 
Expert
Expert

Joined: Fri Aug 19, 2005 2:11 pm
Posts: 628
Location: Cincinnati
heh, for very complicated queries I find it just saves me a ton of time to just go ahead and send it over as sql instead of converting it to hql or transformations if it's possible.

_________________
Chris

If you were at work doing this voluntarily, imagine what you'd want to see to answer a question.


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.