0

I tried to map the groupIds list into the sqlrestriction below but got the error. How should I map it?

 List<String> groupIds = new ArrayList<String>();
  ...
  ...

    Restrictions.sqlRestriction(
       "{alias}.id in (select id from table where group_id in ?)",
       groupIds, Hibernate.OBJECT
    )
Vineet1982
  • 7,730
  • 4
  • 32
  • 67
iPhoneJavaDev
  • 821
  • 5
  • 33
  • 78

1 Answers1

0

Unfortunately Hibernate does not automatically expand non-persistent collections in query conditions. You have to enlist the single groupId's manually.