How would you express the following Criteria query in HQL?
var idArray = new int[] { 1, 2, 3, 4, 5 }; Session.CreateCriteria(typeof(Foo)) .Add(Expression.In('Id', idArray) .List<Foo>();
I am aware of that there is an ‘in’ keyword in HQL, but as I understand it that keyword is for use with subqueries rather than something like ‘… where Id in (1, 2, 3, 4, 5)’ or such. If that is not the case, I will gladly accept corrections.
Thanks /Erik
Try this: