首页 > 代码库 > could not initialize proxy - no Session

could not initialize proxy - no Session

只需要把关联类配置lazy=‘false‘,也就是立即加载

例如:

public class stu{

  private int stuid;

}

 

public class score{

   private stu s;

}

 

stu.cfg.xml把lazy=‘false‘

could not initialize proxy - no Session