I think i have the explanation:
Since someEntity has a property which is a Set, there will be a left join on this other table as well and i'll get duplicates for each item of the Set.
Having said that, i can suppress the duplicates with:
Code:
setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY)
but then i have yet another problem if i want to do pagination since the calls to:
Code:
setFirstResult()
setMaxResults()
are being processed on the whole duplicate result set. What is a solution for that?
Ramin