I've got a pretty simple DAO method that is attempting to retrieve objects without filling in the whole graph for particular fields that contain collections of other objects. So, in my method I set FetchMode.LAZY on the collection fields in question. However, after executing the Criteria list() method, I see that the collections are populated anyway. Is there some other controlling factor that would override my criteria fetch mode?
Here is a code snippet:
session = getHibernateTemplate().getSessionFactory().openSession();
Criteria crit = session.createCriteria(Site.class);
crit.setFetchMode("rooms", FetchMode.LAZY);
List<Site> objects = crit.list();
|