Skip to main content



      Home
Home » Eclipse Projects » EclipseLink » Outer Join with 3 tables is not working(Outer join with 3 tables is issuing a lot of selects for each relation on each row.)
Outer Join with 3 tables is not working [message #844402] Fri, 13 April 2012 20:53 Go to next message
Eclipse UserFriend
Table A has One to One relation with Table B on non primary key of Table A
Table A has One to One relation with Table C on primary key of Table C

While I retrieve rows of Table A with simple JPQL query, I am getting outer join effect but, Eclipse link is issuing One select for rows of Table A and One select to fetch related objects of Table B and Table C. So if Table A has 25 rows, I am seeing 51 selects in all.

How can I tell Eclipselink to issue one select with 2 outer joins.

Thanks
Suri
Re: Outer Join with 3 tables is not working [message #846672 is a reply to message #844402] Mon, 16 April 2012 11:29 Go to previous messageGo to next message
Eclipse UserFriend
You can use "left join fetch" in your query.
Or use batch fetching through hints.

See,
http://java-persistence-performance.blogspot.com/2010/08/batch-fetching-optimizing-object-graph.html
Re: Outer Join with 3 tables is not working [message #850787 is a reply to message #846672] Fri, 20 April 2012 06:28 Go to previous message
Eclipse UserFriend
Thank you James, that was a very good article of yours.
Previous Topic:Missing descriptors
Next Topic:PK Violation on Many-to-One Child Record
Goto Forum:
  


Current Time: Wed Jul 23 19:15:08 EDT 2025

Powered by FUDForum. Page generated in 0.03692 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top