"schoolRankings.school", FetchMode.JOIN).setFetchMode(
"schoolRankings.process", FetchMode.SELECT).setFetchMode(
"processTypes", FetchMode.SELECT).setResultTransformer(
CriteriaSpecification.DISTINCT_ROOT_ENTITY);
User rtn = (User) DataAccessUtils
.uniqueResult(getHibernateTemplate().findByCriteria(crit));
Hibernate.initialize(rtn.getProcessTypes());
Hibernate.initialize(rtn.getRatingTypes());
for (Application application : rtn.getSchoolRankings()) {
Hibernate.initialize(application.getProcess());
Hibernate.initialize(application.getRatings());
}
log.debug("fetched user: "+rtn.getNickname()+" ratings "+rtn.getRatingTypes().size());
// Hibernate.initialize(rtn.getSchoolRankings());
return rtn;
}