I came to an unwanted behavior of Hibernate while retrieving many to many relationship by fetch graph hinted hql. Hibernate executed left outer join query to retrieve that entity and thus returned duplicate results (reason).
But my point is that there is a difference between user specifying Entity graph and manually executing HQL query with left joins.
When user is explicitly executing left outer join, he might be aware of possibility of duplication, but this is not the case with entity graph. User might be unaware of this & he may rely on size() operation to get the count. Besides, entity graph contract only tells about properties to be fetched, so it should not modify the result set (especially the count of returned entities)
Applied PR upstream.