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.  [ 2 posts ] 
Author Message
 Post subject: Using plain JDBC
PostPosted: Thu Aug 17, 2006 12:45 am 
Newbie

Joined: Thu Jul 27, 2006 10:35 am
Posts: 16
Hi All

I read in this forum that in some cases like complex report queries , bulk updates plain JDBC is better than ORM.

We are having some report queries which work properly in Oracle client but we are facing a tough time slipping these queries through Hibernate.
Since our reports involves complex joins & aggregate functions we are encountering problem creating aliases. Infact we did not even had to spend so much time creating those complex report queries that we are now facing in making them Hibernate compatible.

With this background, I would want to know how can I use JDBC along side Hibernate. We will be using Hibernate for most part of the application but only for reports we plan to use JDBC.

How can I use plain JDBC in such a scenario. I have only queries to run from JDBC not any DML.

DO post your comments on the same


Regards


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 17, 2006 1:39 am 
Expert
Expert

Joined: Thu Dec 23, 2004 9:08 pm
Posts: 2008
Code:
Connection con = session.connection();
Then use con as you usually would.

Depending on the query, it may be better to use named sql-query, returning scalars. Have a look at the ref docs, section 16.3.

_________________
Code tags are your friend. Know them and use them.


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