This one only replicates in 5.2.12. In 5.2.13 and 5.3, we have some other issue so both these tests fail.
Anyway, the mapping is not correct since you have an @Id mapping on the ManyToOne even if it's not included in IdClass.