开发者

what does inverse and cascade means in NHibernate

I'm learning Fluent Nhibernate and my question is:

What does Inverse mean? I read that it means that the other side of the relationship is responsible for the saving, and so does Cascade,

Can some开发者_如何学Cone please explain what are the differences between them? Please explain in details because I'm a newbie at NH.


Have a look at this text (link down, here's a mirror on archive.org), the "inverse" attribute is explained in detail.

The different cascade options are well explained by Ayende himself in his blog.

A good and recommended read is "NHibernate in Action", while not an easy text, this will cover a lot of your questions.


I found an explanation when Inverse = false is necessary. If I want a Parent with collection of "children" and in the child object there won't be a reference to the parent.
so you do Has many on the parent add inverse = false and not adding the reference in the child.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜