users@glassfish.java.net

Re: A query with LEFT JOIN FETCH returns duplicates when it shouldn't

From: <glassfish_at_javadesktop.org>
Date: Tue, 13 Nov 2007 15:03:54 PST

Indeed using a distinct selection solves the NonUniqueResultException problems. I had the same problem and applied the advice of mb124283.

problem solved.

The HQL:
select distinct account from Account as account inner join fetch account.billingContact left outer join fetch account.modifiedByEmployee left join fetch account.users left join fetch account.acountCoPhoneNumbers left join fetch account.domains left join fetch account.comments left join fetch account.problems left join fetch account.personalContacts where account.id=?
[Message sent by forum member 'lancestine' (lancestine)]

http://forums.java.net/jive/thread.jspa?messageID=245303