Daryl Stultz schrieb:
> On Tue, Nov 17, 2009 at 9:27 AM, Michael Simons
> <[email protected]>wrote:
> 
> 
>> You state, that you're query with distinct and join fetch does work
>> properly. But this would
>> mean OpenJPA-1365 doesn't occur, does it?
>>
> 
> The JIRA states:
> This issue occurs if the proposed fix for OPENJPA-894 is in place.
> 
> So 1365 does not occur unless you've patched your code such that 894 is
> fixed. What version of OpenJPA are you using and do you have any patches in
> place?
>  
We are using OpenJPA 1.2.1; AFAIK we do not have 894 patch. But we do have the 
same behaviour as
described in 1365.

>> When we call "select a from A a join fetch B" we get n instances of A, with
>> n = numbers of
>> A-B-associations.
>>
> 
> This is the correct behavior. I have found with OpenJPA 1.2.1, I get
> distinct rows of A which sounds like what you (and I) want but is improper.
> 894 shows that a second run of the query in the same EntityManager yields
> duplicates A's (with LEFT JOIN FETCH). What happens when you do this:
> 
> select distinct a from A a join fetch a.bs
> ?
> 
> How about these two:
> select a from A a left join fetch a.bs
> select distinct a from A a left join fetch a.bs
> 
> I don't want to give the impression that I'm an expert on the matter, just
> that I've dealt with this issue and I want to be sure my understanding of
> things is accurate.
> 

-- 
mit freundlichen Grüßen,
Michael Simons

OPTITOOL GmbH
Bruderwöhrdstr. 15b
93055 Regensburg
Tel: +49(0)941.595780
Fax: +49(0)941.595787

Reply via email to