About fetch

api-jpa

javax.persistence.criteria.Fetch

Represents a join-fetched association or attribute.(Interface of JPA)

 
api-jpa

fetch(attributeName)

Create a fetch join to the specified attribute using an inner join.(Method of javax.persistence.criteria.FetchParent)

 
manual

Retrieving JPA Entity Objects

Explains how to use JPA to retrieve entity objects from the database.... by Class and Primary Key Retrieval by Eager Fetch Retrieval by Navigation and Access Retrieval ... set from another entity object. Retrieval by Eager Fetch Retrieval of an entity object from the database might cause ...

 
api-jpa

fetch(attribute)

Create a fetch join to the specified single-valued attribute using an inner join.(Method of javax.persistence.criteria.FetchParent)

 
api-jpa

fetch(attribute, jt)

Create a fetch join to the specified single-valued attribute using the given join type.(Method of javax.persistence.criteria.FetchParent)

 
api-jpa

fetch(attributeName, jt)

Create a fetch join to the specified attribute using the given join type.(Method of javax.persistence.criteria.FetchParent)

 
api-jpa

fetch(attribute)

Create a fetch join to the specified collection-valued attribute using an inner join.(Method of javax.persistence.criteria.FetchParent)

 
api-jpa

fetch(attribute, jt)

Create a fetch join to the specified collection-valued attribute using the given join type.(Method of javax.persistence.criteria.FetchParent)

 
api-jpa

Criteria Query From Elements

Reference (JavaDoc) of JPA query criteria FROM clause interfaces, including From, Root, Join and Fetch.... section for more details and examples. Join Fetch Elements Join Fetch is managed in criteria queries by the following interfaces: ...

 
forum_thread

How do I achieve a Deep Fetch using JOIN FETCH?

I have an Entity type which is contains a collection of Embeddable objects, which in turn themselves contain a collection of Embeddable objects: @Embeddable class A { String val; }; @Embeddable class B { List<A> aList; }; @Entity class C { @Id long id; List<B> bList; };   Usually I'm content to have the B's and A's be lazily loaded, but I have a circumstance where I need to be able to work with the whole C object, with all its parts, as a detached object. ... I know that I can express one level of eager fetch in JPQL as follows: SELECT c FROM C JOIN FETCH c . bList WHERE c . id = :id But when I attempt to ...