openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daryl Stultz <>
Subject Re: Unnecesery INNER JOIN
Date Fri, 23 Jul 2010 13:46:40 GMT
On Fri, Jul 23, 2010 at 9:39 AM, RCollins

> I disagree with you when you say that if I want to fetch it should
> not
> create any joins.  It is the same type of thing as trying to fetch
> b.a.description.

I agree.

>  If you wanted to fetch just the id, then you do not try to
> access the joined table.  You simple access the column on table B.  b.a_id.

I think the OP (and I) are wondering how you access b.a_id from JPQL? I
would have B.a as an association but I would not have a property B.a_id. One
could be added but I dislike adding properties/relations not part of the
business model for purposes such as this. I think I would simply use JDBC to
get a_id.

Daryl Stultz
6 Degrees Software and Consulting, Inc.

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