Issues

Select view

Select search mode

 
21 of 21

UnknownTableReferenceException when two subclasses have same field with different type

Fixed

Description

After upgrading to 6.0.2, our application fails to start with a UnknownTableReferenceException. Shrinking the test case leads me to believe that the problem is two sub-entites (DriMaterial and HotMetalMaterial) both add a property furnace, but of different type (ReductionShaftFurnace and BlastFurnace, respectively).

The exception mentions BlastFurnaceas the unknown table (technically, its table in the database), and HotMetalMaterial is also defined below DriMaterial in the HBM file.

Attachments

1

Details

Assignee

Reporter

Worked in

Components

Fix versions

Affects versions

Priority

Created June 27, 2022 at 12:55 PM
Updated July 1, 2022 at 12:08 PM
Resolved June 28, 2022 at 11:53 AM

Activity

Show:

Andrea BorieroJune 28, 2022 at 6:50 AM

Hi,

Thanks a lot for the Jira and the test case, I’m going to work on it!

Krister EmrénJune 27, 2022 at 3:39 PM
Edited

I turned on debug outputs and it might also be getting confused by a circular dependency: while generating ‘staticFetchList’ for RawMaterialInheritance, it tries to resolve (AbstractMaterial)ancestor). (RawMaterialInheritance)inheritance)

Indeed, changing ancestor to either DriMaterial or HotMetalMaterial instead of AbstractMaterial also makes the test case pass (which possibly hints at a too shallow inspection, since both those are sub-classes of AbstractMaterial and thus also have the inheritance field).

Krister EmrénJune 27, 2022 at 1:20 PM

Confirmed that when I give them distinct names (rsFurnace and bFurnace respectively) the problem goes away. However, the original files are in a JAR file that I do not have source access to, so if it is possible to make it work again it would be really helpful.