【发布时间】:2013-02-21 09:35:48
【问题描述】:
当我映射相同的实体时,就像这里回答的那样:
Hibernate many-to-many association with the same entity
在“tbl_friends”表中,我有相同含义的行。例如,我有 id=1 的用户和 id=2 的用户。在“tbl_friends”表中,当他们作为朋友链接时,我有两行
1-2
2-1
是否有可能使用 Hibernate 或 JPA 注释以某种方式在一行(1-2 或 2-1)中建立这种关系?
【问题讨论】:
标签: hibernate jpa many-to-many