Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

EclipseLink/Examples/JPA/GraphLoading

< EclipseLink‎ | Examples‎ | JPA
Revision as of 16:34, 3 April 2008 by Unnamed Poltroon (Talk) (How to Optimize Object Graph Loading with JPA)

Catnicon.gifThis page is under construction.

How to Optimize Object Graph Loading with JPA

A common problem developers face when using object-relational solutions is how to optimize the loading of a graph or related objects. By default a query for the root object type and default navigation through the graph can result in a N+1 SQL performance problem. This how-to highlights EclipseLink JPA's available solutions.

Example Model

Querying without Optimizations

JPQL JOIN FETCH

EclipseLink Hints

EclipseLink provides additional support for joining and batch reading using query hints.

JOIN FETCH Hint

BATCH Hint

Copyright © Eclipse Foundation, Inc. All Rights Reserved.