MappingException: Unable to find column with logical name when multiple Entities reference the same parent entity

Description

I'm encountering a weird problem in the following situation:

Assume i have three entities A, B, C
A has a simple PK, consisting of a single string
B has a composite PK, consisting of the same string as A, plus an integer field
C has a composite PK consisting of all the properties from B, plus two additional strings

Now, in B and C I want to map A using a @OneToMany annotation. To achieve this I assume that @MapsId is the right choice.

However, an exception is encountered:
MappingException: Unable to find column with logical name: <col_name> in org.hibernate.mapping.Table(<table name of B!>)

Testcase to follow...

Environment

Windows, Java 7

Status

Assignee

Unassigned

Reporter

Philipp Nanz

Fix versions

None

Labels

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure