-->
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: Named Query vs CriterBuilder
PostPosted: Wed May 13, 2009 2:15 pm 
Newbie

Joined: Wed May 13, 2009 2:12 pm
Posts: 2
We currently are using named queries contained in the hbm.xml files. There has been discussion to rewrite the methods that call the named queries as CriteriaBuilders. I thought I read awhile ago that named queries had better performance. Is this true? Our named queries are single table lookups with a single (usually) where clause parameter. Do named queries on single tables offer the best performance?


Top
 Profile  
 
 Post subject: Re: Named Query vs CriterBuilder
PostPosted: Mon May 18, 2009 10:18 am 
Newbie

Joined: Wed May 13, 2009 2:12 pm
Posts: 2
Just wanted to give this one final 'bump' in hopes that some new eyes had insight. Thanks.


Top
 Profile  
 
 Post subject: Re: Named Query vs CriterBuilder
PostPosted: Mon May 18, 2009 10:42 am 
Beginner
Beginner

Joined: Wed Oct 03, 2007 4:10 am
Posts: 46
I think you can use Criteria, the difference(if it is) it doesn;t matter. Named Queries are for complex sql which it cannot be write using criteria. imho

_________________
Alexandru BARBAT


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.