更新时间:2023-11-27 23:13:22
无状态会话不支持延迟加载,正是因为他们的无国籍:他们没有跟踪的任何关于与他们检索到的实体
Stateless sessions do not support lazy loading, exactly because they are stateless: they do not track anything about the entities retrieved with them.
的唯一途径使其工作是预先加载的集合。但是,为什么你的希望的使用无状态的会话,如果他们明确你需要什么不提供?
The only way to make it work is eager loading the collection. But why do you want to use stateless sessions, if they clearly do not provide what you need?