`
bleach0608
  • 浏览: 61159 次
  • 性别: Icon_minigender_1
  • 来自: 南京
社区版块
存档分类
最新评论

getHibernateTemplate().load and getHibernateTempla

阅读更多

Take a look at the Hibernate documentation (though I agree is not very explicit) - the HibernateTemplate is basically a wrapper around the native Hibernate API.


get() will return null if an object is not found while load() will always return a non-null object which is a proxy. If the underlying object does not exist, the proxy will thrown ObjectNotFoundException.


load() should be used when you are sure that the object exits while get() when you're not.

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics