on 12-17-2009 7:49 AM
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
Hi Jan,
sorry for the late reply. SAP handles this as follows:
if you load a Policy, the related Coverage entities will be loaded with an additional query. If you execute a query loading multiple Policies, SAP JPA will load all Coverage entities related to all Policies en-bloc by a single additional query.
This behaviour is not configurable.
-Adrian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.