Hibernate OneToOne relationship
问题 I have two persistence entity: User and UserDetail . They have one-to-one relationship. I use hibernate annotations. But I am getting in my database several objects of user information for one same user. Apparently my knowledge of Hibernate annotations are not so good to solve this problem. User class: @Entity @Table(name = "USER") public class User { @Id @GeneratedValue @Column(name = "ID") private Long id; @Column(name = "NAME") private String name; @Column(name = "PASSWORD") private String