-->
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.  [ 5 posts ] 
Author Message
 Post subject: Accessing translated queries
PostPosted: Fri Dec 05, 2003 4:43 pm 
Newbie

Joined: Fri Dec 05, 2003 4:39 pm
Posts: 5
Location: Montr
Hello!

I would like to know how I can get to the translated query... That is, I belive, QueryTranslator.sqlString

Basically, I want to create queries using Hibernate, but eventually run them using the SQL statements only, without Hibernate.

Any ideas?

Thanks,

Daniel


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 06, 2003 9:18 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
That's wierd idea, why do you need that ?

QueryTranslator is a good starting point

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 06, 2003 4:33 pm 
Newbie

Joined: Fri Dec 05, 2003 4:39 pm
Posts: 5
Location: Montr
Simple, performance. What I have designed is a report engine that uses business objects, with relationships etc.

This is fine and dandy when designing the report, but I would much prefer the "final" query to be JDBC only, so I will avoid the configuration startup and query translation at runtime.

Hibernate at design time, jdbc at run time :)

However, I wouldn't know how to use the QueryTranslator... It is really meant for internal usage ;) how do I compile a query if methods are private ? :)

Thanks!

Daniel


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 06, 2003 4:36 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
All SQL for relationship navigation, that is, all SQL except for custom HQL/Criteria queries, is generated at startup and cached. You don't get any performance by isolating and externalizing this.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject: performance...
PostPosted: Mon Dec 08, 2003 12:25 pm 
Newbie

Joined: Fri Dec 05, 2003 4:39 pm
Posts: 5
Location: Montr
Well for one thing, the queries are all HQL, so they need to be interpreted. But that is not a big deal to me, what's more important is the time it takes for the machine to get up and running, the parsing of the xml files and preparation of the configuration...

Because at runtime the user is printing a report, I would prefer not to have to go through the initialization of the machine...

What do you suggest ?


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