i have a composite id defined on my class structure as below. Unfortunatly i always get a hibernate error that complains on the not found \"part2\":
\"Property of @IdCla
From the JPA spec:
The primary key must be defined on the entity class that is the root of the entity hierarchy or on a mapped superclass that is a (direct or indirect) superclass of all entity classes in the entity hierarchy. The primary key must be defined exactly once in an entity hierarchy.
So according to JPA you can't redefine the @Id
. I wouldn't call this a bug.
Although the workaround given as answer here might work, it may happen that for other JPA frameworks it doesn't work.