When to use inverse=false on NHibernate / Hibernate OneToMany relationships?

后端 未结 3 764
孤独总比滥情好
孤独总比滥情好 2020-11-29 16:20

I have been trying to get to grips with Hibernate\'s inverse attribute, and it seems to be just one of those things that is conceptually difficult.

The gist that I

3条回答
  •  暖寄归人
    2020-11-29 17:23

    If you want to have an unidirectional association i.e. that the children can't navigate to the Parent. If so, you FK column should be NULLABLE because the children will be saved before the parent.

提交回复
热议问题