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.  [ 1 post ] 
Author Message
 Post subject: Add criteria to existing HQL query?
PostPosted: Mon Jul 31, 2006 12:26 pm 
Expert
Expert

Joined: Fri Oct 28, 2005 5:38 pm
Posts: 390
Location: Cedarburg, WI
Is it possible to add criteria using the ICriteria interface to an existing HQL query? We will have many cases where some web page will have an arbitrarily complex HQL query, to which the user can add additional criteria through textboxes, dropdowns, etc. We would like to avoid parsing the base HQL query, constructing HQL expressions as text, and inserting that text at the end of the original query's WHERE clause.

I've looked through the ICriteria interface, but it appears that you must start with a single persistent class, which is used to form an implicit, trivial "query" to which your criteria is added.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.