janiceileen wrote:
Hi,
I am very new to Hibernate and has been struggling for weeks.
After reading the documentation of Hibernate, I realised that there are many methods to be used. Eg, Criteria, Named SQL, HQL... etc
I would like to know what is the best method to use when comes to very complicated SQL queries. I need to use one method to do a complicated SQL queries in Hibernate and I am lost in the direction.
Please do give me your kind advise!!
Appreciate it!!
For the complex query, it's better if you use HQL instead of Criteria.
Criteria has a limitation such as cannot join 2 tables or more that don't have any direct association.