Hi All,
I am trying to emulate the following query in Hibernate
Sql QueryCode:
select * from ORDER_HISTORY_SCR_VIEW where REFERENCE_ID in ('MOSU0002','MOSU0003')
Result:Code:
ID Status
======= ======
MOSU0002 completed
MOSU0003 completed
But the issue is when i try this with Hibernate
HQl:
Code:
Criteria crr = session.createCriteria(MyTable.class); crr.add(Restrictions.in(columnPropertyName, errorOrdersFilterList)); System.out.println(crr.list());
ResultCode:
ID Status
======= ======
MOSU0002 completed
MOSU0002 completed
Issue: It fetches the same row twice .
Why is this anamoly ...................Could any one post the solution