在NHibernate中反向和级联是什么意思 [英] what does inverse and cascade means in NHibernate
问题描述
我正在学习Fluent Nhibernate,我的问题是:
Inverse
是什么意思?我读到,这意味着关系的另一方负责保存,所以级联
,
有人可以解释他们之间有什么区别?
请详细解释,因为我是NH新手。
当Inverse = false是必要的。
如果我想要一个包含children集合的父项,并且在子对象中不会有
a对父项的引用。
所以你有很多父项inverse = false并且不在孩子中添加引用。
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 someone please explain what are the differences between them? Please explain in details because I'm a newbie at NH.
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.
这篇关于在NHibernate中反向和级联是什么意思的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!