public User findUser(String email) {
User user = null;
user = (User) sessionFactory.getCurrentSession().createCriteria(User.class).add(Restrictions.eq("email", email)).uniqueResult();
return user;
}
Now I want to add one more restriction as if active is 1 how can I do it. I am not finding any way that I could check for two restrictions
Please suggest
Romi.
The
add(Criteria)method returns itself (this) to allow for chaining.