开发者

NHibernate: why ILifecycle.OnUpdate is not called every time?

NHibernate_reference.pdf, page 26:

Note that ILifecycle.OnUpdate() is not called every time the object's开发者_JAVA百科 persistent state is updated. It is called only when a transient object is passed to ISession.Update().

Why it design link that?


You should use IInterceptor instead


ILifecycle is deprecated; as James L wrote, you should use an IInterceptor implementation instead. My interpretation of the documentation you quoted is that the OnUpdated event is fired from the Update method only. That is, the event was designed to notify subscribers that the Update method had been called and nothing more.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜