@Entity @Table(name = "person") @IdClass(PersonPk.class) public class Person implements Serializable { private static final long serialVersionUID = 1L;
@Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "person") private int person;
@Id @Column(name = "company") private int company;
Reading data works without errors. But, e.g. if I want to update or insert an Address entity, all fields will be updated in database except the person column. What's wrong with my mapping?