Skip to Content
0
Former Member
Dec 17, 2009 at 07:49 AM

JPA: Eager Fetch via (Outer) Join supported?

87 Views

Hi,

in EclipseLink and Hibernate Associations with FetchType.EAGER can be configured, so that the objects are pulled out of the database with a single (outer) join statement.

Example (EclipseLink)

InsurancePolicy has many Coverages.

@OneToMany(fetch=FetchType.EAGER, mappedBy="policy")

@JoinFetch(value=JoinFetchType.OUTER)

private List<Coverage> coverages;

Now, if I load a policy, its coverages are pulled together witht the policy with an outer join out of the datatbase.

How is this handled in the SAP JPA?

Thanks

Jan