hibernate的一个问题

在文档中我看到 one-to-many association 和bidirectional one-to-many association 的两种联系

后者在前者的基础上 在many 端 添加inverse="true" 在one端添加了many-to-one 的标签 为什么要这么做 什么情况用one-to-many association 什么情况用bidirectional one-to-many association

>什么情况用one-to-many association 什么情况用bidirectional one-to-many association

这是个需求问题, 例如:one-to-many 关系中(公司-雇员), 多个雇员需要知道他的公司,而公司不需要知道雇员,就是单向的one-to-many, 否则的话,两边都需要相互知道,就是bidirectional one-to-many association.