[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] http://stackoverflow.com/questions/669828/how-to-have-2-collections-of-the-same-type-in-jpa[/url]

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.