0

I have this select in SQL.

How can I convert it to HQL using Restrictions.or ?

select * from users where users.user_type = 1
     or user.id = 1001;

1001 is not of user_type = 1

Mythul
  • 1,807
  • 7
  • 34
  • 53
  • 1
    Possible duplicate of http://stackoverflow.com/questions/8126589/hibernate-criteria-restrictions-and-or-combination – nakosspy May 24 '13 at 09:43

1 Answers1

0

I managed to fix this problem by using Restrictions.disjunction() and Restrictions.conjunction() with Hibernate.

Mythul
  • 1,807
  • 7
  • 34
  • 53