Duplicate entries in resultset of a hibernate query
If you have duplicate entries in a resultset of a hibernate query, then this could be caused by a eager fetchmode. A result is to add a ResulTransformer to your query.
Example:
Criteria criteria = getSession().createCriteria(Order.class); criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);
More Infos here: https://www.hibernate.org/117.html#A12
jazzanowak @ February 25, 2010