if (laborderConditions.getBalanceStatus() != null) {
if (laborderConditions.getBalanceStatus().equalsIgnoreCase("Open")) {
criteria.add(Restrictions
.sqlRestriction("IFNULL(amount,0)=IFNULL(balance,0)"));
}
}
X12 EDI Examples
Hibernate Criteria retrieve records when two fields are equal
Here is the code snippet from my project to retrieve the records when two field value in the table has the same value.