Search code examples
javahibernatehibernate-criteria

Difference between Restrictions.and() & Restrictions.conjuction() in Hibernate Criteria API


I am new to Hibernate framework. Can somebody please help me with the difference between these two methods as these two perform AND operation. enter image description here


Solution

  • They have effectively the same meaning with the only caveat that Restriction.and() performs the and operation of 2 expressions. Restriction.conjuction() of any number of expressions.