Hi all,
I am using Query By Example in hibernate, but what i am facing is when Hibernate generates the query then all fields will be checked as "
and" operation, while i want to change it to "
or" operation.
e.g
Code:
User user = new User()
        user.setUserId(userId);
        Example ex = Example.create(user);
        ex.ignoreCase();
        ex.enableLike(MatchMode.ANYWHERE);
        list = getSession().createCriteria(User.class).add(ex).list();
so after doing this Hibernate is generating query like
... where userID=? 
and, username=? 
and, address=? 
and...
and what i wants to generate a Query like
... where userID=? 
or, username=? 
or, address=? 
or...
So guys can you help me out please