Basically, you need to provide the following Query Hint:
List<Person> authors = entityManager.createQuery( "select distinct p " + "from Person p " + "left join fetch p.books", Person.class) .setHint( QueryHints.HINT_PASS_DISTINCT_THROUGH, false ) .getResultList();