/** * Constraints a property to be equal to a specified other property * * @param propertyName The property * @param otherPropertyName The other property * @return This criteria */ public Criteria eqProperty(String propertyName, String otherPropertyName) { validatePropertyName(propertyName, "eqProperty"); validatePropertyName(otherPropertyName, "eqProperty"); addToCriteria(Restrictions.eqProperty(propertyName, otherPropertyName)); return this; }