Re: extraneous joins OPENJPA-134

2007-02-16 Thread David Wisneski
When both sides of a relationhship are EAGER this should result in only one join (not two). Account <-> Holidng is One Account has Many holdings. Both roles of the relationship are marked EAGER. If I join Account t0 join Holding t1 on(t1.account=t0.accountId) there should not be a need to do

Re: extraneous joins OPENJPA-134

2007-02-15 Thread catalina shaw
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. T

Re: extraneous joins OPENJPA-134

2007-02-15 Thread Abe White
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

Re: extraneous joins OPENJPA-134

2007-02-14 Thread David Wisneski
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

RE: extraneous joins OPENJPA-134

2007-02-14 Thread Patrick Linskey
What if just one side is eager? Also, is the @OneToMany's mappedBy attribute set up correctly? -Patrick -- Patrick Linskey BEA Systems, Inc. ___ Notice: This email message, together with any attachments, may contain informati