JPA category-language relationship
问题 I am building a category-based web application multilanguage using JPA/Hibernate + Spring I currently built these three beans/entities: Category, CategoryLanguage and Language. Category: @Entity public class Category implements Serializable { @Id @GeneratedValue(strategy = GenerationType.AUTO) private int id; @ManyToOne private Category father; @OneToMany(mappedBy = "father") private List<Category> children; @OneToMany(mappedBy="category") private List<CategoryLanguage> categoryLanguages;