Resolve issue with collection batch duplicates in repository queries

See the Hibernate FAQ for more info:
https://developer.jboss.org/wiki/HibernateFAQ-AdvancedProblems#jive_cont
ent_id_Hibernate_does_not_return_distinct_results_for_a_query_with_outer
_join_fetching_enabled_for_a_collection_even_if_I_use_the_distinct_keywo
rd