【问题标题】:many-to-many and one-to-many relationship in hibernatehibernate中的多对多和一对多关系
【发布时间】:2015-02-06 13:45:25
【问题描述】:

一共有三个表 表 1 和表 2 具有多对多关系。 因此在两个文件中的 .hbm.xml 中映射时使用 set 并建立多对多关系。 现在,表2和​​表3有一对多的关系 那么,我必须在table_2.hbm.xml中再次使用set吗?

【问题讨论】:

    标签: hibernate many-to-many


    【解决方案1】:

    One 一侧,您应该使用 Set。在Many 一侧只是对其他实体的引用。

    【讨论】:

      猜你喜欢
      • 2015-02-05
      • 2021-02-16
      • 1970-01-01
      • 2011-09-30
      • 1970-01-01
      • 2011-08-29
      • 2017-08-28
      • 1970-01-01
      • 2011-12-15
      相关资源
      最近更新 更多