| thank you for the detailed article! In my understanding this query because I'm returning an entity and hibernate will use the distinct to deduplicate entities (I could use the query hint to avoid the unnecessary distinct at database level). Now in the case of this issue I'm returning a projection and then hibernate can't use the distinct to deduplicate results right? Is it because in the projection we can't guarantee that we have all information to deduplicate records? |