For some reason when i run my createQuery from the Session object that is initialized, it returns the correct number of objects, but the objects are duplicated. It seems that hibernate pulls the first row it finds containing my first column value.
Example:
DB Table
ROW_1 ROW_2 ROW_3 ROW_4
1234 abcd 10-08-2008 dev
1234 efgh 11-08-2008 dev
1234 ijkl 12-08-2008 dev
1234 mnop 1-08-2009 dev
if this were the data contained in my table and i had an HQL like this:
String SQL_STRING = "FROM UnitData data WHERE data.row4 = '" + row4 + "' ORDER BY data.row1 asc";
I would get 4 UnitData objects all with the same data:
1234 abcd 10-08-2008 dev
Any ideas as to why that happens?
_________________ Thanks
|