On Tue, Nov 17, 2009 at 5:27 AM, Michael Simons
<[email protected]>wrote:

> Hello,
>
> OpenJPA-1365: DISTINCT keyword has no effect with JOIN FETCH queries
>
> We're porting a formerly JDO based application to JPA.
> We wanted to heavily use JOIN FETCHs to reduce the number of SQL statements
> generated.
> We do not know how to get rid of those weird duplicates produced by a JPQL
> statement including a
> join fetch clause.
>

The duplicates are "proper" by the specification, just as would happen in a
standard SQL join. 1365 is related to 894, neither of which are fixed. I
originally wrote my join fetch queries with no DISTINCT until I ran into
894. Now with DISTINCT and join fetches I don't get duplicates. Can you give
an example of a query and what it returns (and what you'd like it to
return)?

-- 
Daryl Stultz
_____________________________________
6 Degrees Software and Consulting, Inc.
http://www.6degrees.com
mailto:[email protected]

Reply via email to