1.
load方式检索不到的话会抛出org.hibernate.ObjectNotFoundException异常
get方法检索不到的话会返回null。load 和get 都会去数据库检索。但 load 首先回去查session的persistent Context中是否有缓存。如果缓存中有的换回直接返回。
get方法检索不到的话会返回null。load 和get 都会去数据库检索。但 load 首先回去查session的persistent Context中是否有缓存。如果缓存中有的换回直接返回。