Join Fetch for One To Many relationship is returning same entity multiple times
<p>I have the following mapping<br/>
1 User can have 0 or more roles.<br/></p>

<p>Query <br/>
from User u JOIN Fetch u.roles </p>

<p>If User1 has two roles RoleA and RoleB. <br/>
Then User1 is returned twice. </p>

<p>What i expect is User1 should be returned Once with list of roles containing RoleA and RoleB <br/>
How can I fix this. <br/></p>

<p>Also please explain behavior for Many To Many relationship.</p>