就是在你的pojo的那个类(就是你加@Entity的那个类)上面加annotation
@org.hibernate.annotations.Proxy(lazy=false)
这么做的原因是,hibernate3默认的把lazy load给打开了,就是true呗。
你把它显式的设置为false,这个功能就被关了,也就不用什么session了。
@org.hibernate.annotations.Proxy(lazy=false)
这么做的原因是,hibernate3默认的把lazy load给打开了,就是true呗。
你把它显式的设置为false,这个功能就被关了,也就不用什么session了。