Hibernate: just save an entity with @EmbeddedId as primary key

Downgrading to version

4.3.11.Final

worked...


I think you are hitting a bug with composite keys mapped as EmbededID in hibernate 5.0 and 5.1 It is supposed to be fixed in 5.1.1 https://hibernate.atlassian.net/browse/HHH-10618

Try changing the hibernate version. Also I can see in one of the comments that @K.Nicholas is saying that the same code works for him. This is why I am even more inclined to think you are hitting this bug.