Hibernate version: 3.0.5
Mapping documents:
Name and version of the database you are using: Oracle 9i (9.2)
Hello,
We have the following object hierarchy (where "<-" is supposed to represent a UML gen/spec relationship):
Base <- Item <- SpecialItem
Base <- ItemAssignment
Base contains a unique identifier that is mapped as a generated id in all of our mapping files. Item and SpecialItem are mapped to different physical tables.
The ItemAssignment object contains a reference to an Item object and the physical table stores an id for a SpecialItem object. The mapping for the Item object in the ItemAssignment mapping file refers to the actual Item object, which SpecialItem extends.
The following HQL query is the source of our trouble:
select assignment.item.identifier.id from ItemAssignment as assignment
What we expect is the value stored in SpecialAssignment.identifier.id, however what we are getting back in the query is ItemAssignment.identifier.id.
This makes no sense to me and I've double/triple checked the simple query, which is identical to the one above.
Does anyone have any thoughts or suggestions on how to approach this issue?
Thanks,
John
|