We're updating the issue view to help you get more done. 

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

Labels

Components

Affects versions

4.3.6
5.0.8

Priority

Major