Hi there, I'm having problems getting hibernate to lazy load.
I'm finding that lazy loading is working fine when I do a load by id. Eg, loading by the primary key,
Code:
CandidateVo cand = (CandidateVo) getHibernateTemplate().get(
getVOClass(), registration);
Now comes my problem, I find that when I start to introduce sub criteria, that is criteria on relationships, that the lazy loading is discarded and the properties are loaded eagerly in the same sql statement. Only the properties that belong to the relationship references in the criteria are eagerly loaded.
Is this expected behavior?
I've specified in my mapping xml that lazy="true" and fetch="subselect" on the relationship which is a set.
Any direction would be appreciated.