0

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,

Community
  • 1
  • 1
kandarp
  • 4,979
  • 11
  • 34
  • 43

1 Answers1

0

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.

fastcodejava
  • 39,895
  • 28
  • 133
  • 186