-->
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: Executing a SQL query upon NOT persistent objects
PostPosted: Thu Sep 02, 2004 8:55 am 
Newbie

Joined: Thu Mar 11, 2004 5:39 am
Posts: 13
Hibernate version:

Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:

Debug level Hibernate log excerpt:

Hi,

I need to execute a SQL query, let's say a select from a table, but the table is NOT linked to a persistent object. I'd just like tu use hibernate to get a connection on the database and then execute my query, so I don't have to manually create a JDBC connection...that is something like:

Session sess = Hibernate.getSession();

sess.executeQuery(MY SQL QUERY);

is there a way to do that?

thanks a lot


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 02, 2004 12:17 pm 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
you can't!
the only thing you can do is get the jdbc connection from the hibernate session and strat working with jdbc

_________________
Anthony,
Get value thanks to your skills: http://www.redhat.com/certification


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.