Hibernate could not initialize proxy - no Session

后端 未结 3 1669
小鲜肉
小鲜肉 2021-02-13 13:14

My code retrieves all information related to the user:

SessionFactory sessionFactory = HibernateUtilities.configureSessionFactory();
Session session = sessionFac         


        
3条回答
  •  死守一世寂寞
    2021-02-13 13:43

    All the primitive properties of the classes are loaded right away, they can't be lazy unless you're using bytecode enhancements. Only real associations like your collection can be lazy.

提交回复
热议问题