Possible Duplicate:
Hibernate: Criteria vs. HQL
There are HQL Query and Criteria Query in Hibernate. I just wanna that which will be used in which scenario? And what are advantages and disadvantages over each other?
Thanks,
Possible Duplicate:
Hibernate: Criteria vs. HQL
There are HQL Query and Criteria Query in Hibernate. I just wanna that which will be used in which scenario? And what are advantages and disadvantages over each other?
Thanks,
HQL Query is similar sql query using object and their attributes. It is a string
, so the you don't if it is correct until runtime. Criteria query is less error prone.