shrimon wrote:
I have the following code.
List results = session.createCriteria(MyClass.class)
.add(Restrictions.eq("ATTR_ID",attrID))
.addOrder(Order.desc("CODE_LONG_DESC"))
.list();
The size of the results list is 5.
But all the 5 rows are having the same data.
Any idea what is happening?
Thanks in advance.
Shrimon.
This can happen if there is a join in your mapping. You can create a new Set() using the results which will limit to only one object.
(Also, why the Hibernate guys always request that you include your mapping files in your post) ;-)