Hibernate version: 2.1.7c
Mapping documents:
Code:
<class name="common.backend.vo.FieldVO" table="FIELD" discriminator-value="field">
...
<discriminator column="LAYOUTTYPE" type="string"/>
...
</class>
I am using the table-per-class-hierarchy strategy and FieldVO is the base class in my inheritance hierarchy. What I need in my application is to obtain all the objects from table FIELD but, because the column LAYOUTTYPE is mapped as discriminator I can't get its value. I need to know what "layout type" each object has. How can I get the discriminator value in class FieldVO?
This bean's method getLayoutType() returns null so it is unusable. I think the solution might be in using some metadata classes or something like PersistentClass but I don't know how. Can you tell me how to obtain the discriminator value? Thank you.