openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daryl Stultz <da...@6degrees.com>
Subject Re: How work around OpenJPA-1365
Date Tue, 17 Nov 2009 13:21:10 GMT
On Tue, Nov 17, 2009 at 5:27 AM, Michael Simons
<michael.simons@optitool.de>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:daryl@6degrees.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message