@IdClass required for a @ManyToOne column

Having a JPA entity (e.g. CompanyAddress) with a somewhat strange primary key setup, where the primary key is also just a foreign key for another table (e.g. Company) with the naive setup of the ID field: @Id @ManyToOne() @JoinColumn(name = “COMPANY_ID”) private Company company; and then creating a Spring Repository for the entity, I got …