I've tried three different queries and the list of entities always comes back with duplicate values where the object array is correct:
Code:
Query query1 = session.createQuery(" from testTable WHERE userId=:userID");
query1.setParameter("userID", userId);
List hqlList = query1.list();
SQLQuery query2 = session.createSQLQuery("select * from testTable where userId=:userID").addEntity(TestTable.class);
query2.setParameter("userID", userId);
List sqlList = query2.list();
SQLQuery query3 = session.createSQLQuery("select * from testTable where userId=:userID");
query3.setParameter("userID", userId);
List objArray = query3.list();
Only query3 (the object array) returns correct with different records, the contain duplicate objects of the first record.