Session s=sessionFactory.getCurrentSession(); s.beginTransaction(); String hql="from TempPhotoEdit tempPhotoEdit left join fetch tempPhotoEdit.tempPlan left join fetch tempPhotoEdit.systemFodder where IB_ID=?"; List<TempPhotoEdit> l=s.createQuery(hql).setParameter(0,"25").list(); System.out.println(l); s.getTransaction().commit();