Hibernate version: 2.1.6
Hi,
Is there anyway i can use existing java collections for the "in" clause ?
Say i have an arraylist "myArrayList" with Integers 1,3,5 and i want to return all myobjects with these id's
My query would become something like
from MyObject as myobject where myobject.id in ( myArrayList )
HQL is all about objects , so i figured this should be possible?
ATM i am just building a comma separated string like "1,3,5" and putting this in the query - it works but i figured there must be a nicer way.
Regards
Jorg
|