 32 | Fetch Retrieval of an entity object from the database might cause automatic retrieval of additional ... using a lazy fetch type:
@Entity
class Employee {
:
@ManyToOne(fetch=FetchType.LAZY ... with the FetchType.LAZY fetch policy is initialized to reference a new managed hollow object (unless |
 31 | 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 take it to the 2nd level:
SELECT c FROM C JOIN FETCH c.bList JOIN FETCH c.bList.aList WHERE c.id=:id I get an error along the lines of:
Invalid fetch path |
 25 | fetch doi.metadata metadata
left join fetch metadata.titles titles
left join fetch metadata.creators creators
left join fetch metadata.descriptions descriptions
left join fetch metadata.publishers publishers
left join fetch metadata.contributors contributors
left join fetch metadata.dates |
 25 | Hello, I'm a little bit confused about a left join fetch behaviour. In this test case, i try to fetch my 3 children using a left join fetch. But my collection is null after closing the em. It was expected to be fetched before closing the em, no ? In fact, that is the objective of the fetch purpose |
 23 | Hello, I'm doing some tests to choose the best collection fetch strategy. I have entities with many ... ,join fetch seems to be the right choice. What about ObjectDb ? The implementation is totally different. Is an "All eager strategy" more efficient that many join fetch ( cartesian product + distinct |
 23 | First of all, thank you for promptly implementing JOIN FETCH over nested paths in response ... , but I attempt to LEFT JOIN FETCH all the members of a collection within a (non-existent) member ... FETCH c.bList WHERE id=:id; But if I include the full nested fetch, it fails, returning an empty result |
 22 | JOIN FETCH to avoid excessive round trips to the database:
SELECT c FROM Country c JOIN FETCH c ... addresses (obviously fetched lazily), but still 2 results. What should I be doing to get what I want out of this query? Note that I need to get the fetch mode specified in the query, not in |
 22 | I have a class where two fields are annotated with @Basic(fetch = FetchType.LAZY ... app). Yet they don't seem to be fetched lazily. This class should hopefully demonstrate the problem ... ;
@Basic(fetch = FetchType.LAZY)
private String description;
@Basic(fetch = FetchType.LAZY |
 22 | If I dont declare explicitly the fetch strategy for "children" as FetchType.Eager, then how can I ... default JPA spec says that colletions are to be lazy fetched. You can try this in a query. "select n from Node n left outer join fetch n.children where ....." this will also fetch your collection |
 22 | jpqlResult = em.createQuery(
"SELECT d FROM Demand d JOIN FETCH d.services WHERE d=:demand ... and fetch its services. Demand object is identified and found correctly, but as it is associated ... should return only one result, with fetched service sub-elements, shouldn't it? I am almost sure |