-->
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: Best way to build dynamic queries?
PostPosted: Fri Nov 26, 2004 6:13 am 
Newbie

Joined: Fri Oct 22, 2004 6:55 am
Posts: 16
Location: Hamburg, Germany
In 'Hibernate in Action', paragraph 7.5.1 "Dynamic queries", it is discussed how to build dynamic queries.

Firstly, a HQL example with some String concatenation is shown and is it stated that this code is 'tedious and noisy' (which is my opinion too). In the following, better approaches are explained, all building upon the Criteria API.

My question is: I have learned, that the Criteria API is only experimental and has some serious drawbacks in comparison to HQL. What is the best way to build dynamic queries?

I really like the Criteria API. In my opinion, this is the way how object oriented applications should work with RDBMS queries. Due to the drawbacks, I can't use it and would like to now, if there is a way to avoid the StringBuffer operations.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 26, 2004 7:05 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Criteria is stable for almost a year, it was experimental some time ago. Where did you find this information.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 02, 2004 5:52 am 
Newbie

Joined: Fri Oct 22, 2004 6:55 am
Posts: 16
Location: Hamburg, Germany
For example in the API documentation (Hibernate-2.1) for Criteria: 'This is an experimental API'


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.