Inheritance mapping with sqlresultsetmapping gives an undefined column name was detected

Description

Hello,

I have issues with the following:
situation
I have 3 entities (all have primary composite keys):

  • relation

  • customer extends relation

  • contactperson

Relation has a sqlresultsetmapping with 2 entityResults : Relation and Contacperson.

I execute a nativequery with a resultsetmapping.
This works well and I get a list of Relation and contactperson (via a subselect I only have one contactperson result)
At first I don't have a customer, later I added customer who extends relation and then the native query fails
It works well until I extend customer from relation.

Then I got following error :
an undefined column name was detected
(full stacktrace is in attachment)

I can see that it wants to map to customer instead of relation but I want relations, because there are more relations than just customers in that relation table.

Thus the question is : How can I make the resultset clear that it don't have to get Customer but Relation?

Environment

Hibernate 3.5.4-Final
legacy DB2

Assignee

Unassigned

Reporter

Wim Anckaert

Labels

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

None

Pull Request

None

backportDecision

None

backportReEvaluate

None

Priority

Major
Configure