How to use AND OR operator in hibernate Detached criteria query?

How to use AND OR operator in hibernate Detached criteria query?

How to use AND OR operator in hibernate Detached criteria query?

View Answers

June 1, 2012 at 5:46 PM

You can use AND, OR operator in hibernate detachedCriteria through Restrictions.conjunction() and Restrictions.disjunction(). Detached Criteria query is a facility provide by Hibernate to write criteria queries in ?detached mode?, where hibernate session is not available. You can instantiate this class anywhere.

Click here for AND operator example.

Click here for OR operator example.









Related Tutorials/Questions & Answers:

Ads