Hibernate: Where do insertable = false, updatable = false belong in composite primary key constellations involving foreign keys?
Let me answer step by step. 1. When do you need ` insertable = false, updatable = false`? Let’s look at the below mapping, public class Zip { @ManyToOne @JoinColumn(name = “country_code”, referencedColumnName = “iso_code”) private Country country = null @Column(name = “country_code”) private String countryCode; } Here we are referring to the same column … Read more