Hi,
It is possible to integrate Hibernate into the following DB-Schema and object model without changings of the structure?
DB-Schema:
UnitReport 1-n UnitReport_Attribute_Value n-1 Attribute
UnitReport(Id, StartEndTime...)
Attribute(Id, Name, DatatypeID)
UnitReport_Attribute_Value (Id, ValueDouble, ValueString, ValueBoolean).
The obj model looks as follows. Each UnitReport contains a Map of attribute and value pairs, whereas the attribute has the same structure such as the corresponding table.
For each column in the ur_attribute_value exists a concrecte class (e.g. ValueDouble, ValueString, etc.), whereas all value class inherit from Value.
I know that I can do this with hibernates concept of mapping one table per class hierarchy, but the disriminator is defined in the attribute table.
Cu,
Marcel
|