Hello all,
I am new to Hibernate and still trying to figure this thing out, so please excuse me if this is a trivial question.
In a many-to-many relationship, what is the difference between setting the "fetch" attribute to "select" vs "join"? I can't tell a difference.
I am tweaking my HQL to get the desired results using "left join fetch" but I am getting duplicate records back and I want to find a way to the duplicates. I am wondering if I am misintrepreting this field as I have fetch="join".
I also don't understand what the bolded part of the Hibernate Reference text below is trying to indicate. Can someone interpret for this newbie?
Quote:
(4) fetch (optional - defaults to join): enables outer-join or sequential select fetching for this association. This is a special case; for full eager fetching (in a single SELECT) of an entity and its many-to-many relationships to other entities, you would enable join fetching not only of the collection itself, but also with this attribute on the <many-to-many> nested element.
Thanks,
-Matt