setFetchMode « Fetch « JPA Q&A





1. Need help with using setFetchMode    forum.hibernate.org

Hello, Not been successful using setFetchMode. I want to dynamically fetch lazy to eager. Please let me know if anyone has used successfully in their project. Here is my code. In the main class I have borrower has lazy: @OneToMany(cascade = CascadeType.ALL,fetch = FetchType.LAZY,targetEntity = Borrower.class) @JoinColumn(name="ID_LOAN") private Set mBorrowers = null; While creating query I change it to JOIN Criteria ...

2. Problem with setFetchMode() on Subcriteria of Subcriteria    forum.hibernate.org

I have the same problem, I solved it using HQL: StringBuffer strQuery = new StringBuffer(1000); strQuery.append("from Project p ") .append("left join fetch p.savedQuantification q ") .append("left join fetch q.blocks bl ") .append("left join fetch bl.blockDetails bd ") .append("left join fetch bd.savings s ") .append("left join fetch p.spendArea ") .append("left join fetch p.cluster ") .append("left join fetch p.spendCategory ") .append("left join fetch ...

3. setFetchMode not working    forum.hibernate.org