Reputation: 3921
Hibernate + HibernateTemplate + Lazy Loading + HQL
We are using HibernateTemplate's find method by passing a HQL query. How do i retrieve the child elements as we have configured Lazy Loading?
Thanks.
Upvotes: 0
Views: 1225
Reputation: 597362
It depends. You can get the elements of the collection by using JOIN FETCH
in the HQL query, or you can later call Hibernate.initialize(entity.getSomeLazyCollection())
Upvotes: 2