Get方法
不支持延迟加载
load
支持延迟加载
如果,数据库中,没有 OID 指定的对象
通过get方法加载,则返回的是一个 null
通过 load 加载,则返回一个代理对象
如果,后面代码调用对象的某个属性会抛出异常:org.hibernate.ObjectNotFoundException;
Get方法
不支持延迟加载
load
支持延迟加载
如果,数据库中,没有 OID 指定的对象
通过get方法加载,则返回的是一个 null
通过 load 加载,则返回一个代理对象
如果,后面代码调用对象的某个属性会抛出异常:org.hibernate.ObjectNotFoundException;