This is not about
distinct.
I think the most ellegant way to get distinct entities is using ResultTransformer - DISTINCT_ROOT_ENTITY.
See
http://www.hibernate.org/hib_docs/v3/re ... sociations
chapter 16.4, example with returnMaps() - the deprecated apperance of ResultTransformer.
The problem is that I need something like a combination of two ResultTransformers:
1. DISTINCT_ROOT_ENTITY - distinct root entities
2. ALIAS_TO_ENTITY_MAP - childs should be also filtered
But I wish to have "nice" results, not list of maps, that I still have to
iterate in order to get list of root entities with properly filled (and filtered) childs.
Can hibernate provide such feasibility (maybe there is other path, not using ResultTransformers)
???
Thanks all very much for participation in the post.