首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

[Hibernate] How to have 二 collections of the same type in JPA/Hibernate

2012-10-20 
[Hibernate] How to have 2 collections of the same type in JPA/Hibernate?这种情况这么办?public class

[Hibernate] How to have 2 collections of the same type in JPA/Hibernate?
这种情况这么办?

    public class Parent{       private List<String> sons;   //我希望把这个关系映射到  parent_child 表       private List<String> daughters; //我希望把这个关系也映射到 parent_child 表   }


答案是: You can't do it.

看这个URL:
[url] http://stackoverflow.com/questions/669828/how-to-have-2-collections-of-the-same-type-in-jpa[/url]

热点排行