openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "catalina shaw" <catalinas...@gmail.com>
Subject Re: extraneous joins OPENJPA-134
Date Thu, 15 Feb 2007 20:04:54 GMT
Regardless the ManyToOne is EAGER by default, when its
inverse relationship if
1. set to EAGER  (select a from a a;  a has the OneToManyRelation property)
or
2. set to LAZY but Eagerly Fetched by query (select ... from a a join fetch
a.OneToManyRelation )

We see unneeded joins being generated.

The issue is why generating the extraneous joins that can be optimized away.


>> I've looked at the code and it looks correct to me and tried various

>> things like making the inverse LAZY. But it always generating the

>> extraneous join. I've attached the entity source code.

>>

>> The relationship causing problem is

>>

>> @ManyToOne

>> @JoinColumn(name="ACCOUNT_ACCOUNTID")

>> private Accountejb2 account2;
>ManyToOne is eager by default, so right now both sides are eager.

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