-->
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: design issue: introduce Hibernate into our application
PostPosted: Wed Oct 05, 2005 11:07 am 
Newbie

Joined: Wed Sep 21, 2005 12:37 pm
Posts: 4
we have an exsiting application, we decided to introduce hibernate into our application.
currently, there are lot of very complex query written in native SQL,we use feature such as union, native sql functions such as rank() and some OLAP functions.
I know we can use createSqlQuery, this may be the easiest way to convert the current application.
however,we like to take the advantage provided by hibernate, such as using HQL, critira API for complex searching screens.
any body have experience and suggestions on such complex SQL convertions.
Thank you


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 05, 2005 12:08 pm 
Senior
Senior

Joined: Wed Aug 17, 2005 12:56 pm
Posts: 136
Location: Erie, PA (USA)
We use alot of native SQL queries in conjunction with HQL & Criteria queries. We have a very normalized (over normalized?) db that seems to necessitate native SQL (and stored procedures) in order have adequate performance. Despite our heavy reliance on native SQL, I still think Hibernate is a good fit -- we use whatever query technique is best for the situation.

HQL and Criteria queries can do pretty complex queries -- you need to spend the time in order to learn how.

I would recommend externalizing your native SQL (and HQL) queries as named queries whenever possible; use named parameters; if using Hibernate3, use <return-property...> rather than {} syntax for returning results from native SQL.

Curtis ...


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.