2013年10月5日

Hibernate:有了 save,为什么还需要 persist?

摘要: 背景万物皆自然,每个 API 的设计,无论是否正确,都有其意图。因此,在学习某些框架的时候,我们需要经常思考:这个 API 的设计意图是啥?本文来探讨一下 Session 中 persist 的设计意图。官方注释save 1 /** 2 * Persist the given transient instance, first assigning a generated identifier. (Or 3 * using the current value of the identifier property if the assigned 4 * gen... 阅读全文

posted @ 2013-10-05 10:05 幸福框架 阅读(11541) 评论(0) 推荐(0) 编辑

导航

我要啦免费统计