Hi We are building a new application. I want to have an interface to Hibernate from my application which will generate Hibernate queries on the fly depending on the input provided.
My concern is that Hibernate requires alias names before the column names in select stmts, in the where clause, in from clause. Also, how would you build a where clause dynamically when you have to do grouping of the conditions.
If anyone has ever worked with generating dynamic queries, please point out what I could do or if I am missing something.
All inputs will be appreciated.
[ August 23, 2005: Message edited by: Harsha Pherwani ] [ August 23, 2005: Message edited by: Harsha Pherwani ]
posted 11 years ago
Check out Hibernate's Criteria API. It allows you to build queries programmatically and is well suited to what you want to do.
---<br />Co-author of "Hibernate Quickly"<br /><a href="http://www.manning.com/books/peak" target="_blank" rel="nofollow">http://www.manning.com/books/peak</a>
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads