Hi
If you have experience with the <properties> element you might be able to help me with a different problem in my other thread:
https://forum.hibernate.org/viewtopic.php?f=1&t=1003443I am using Hibernate core 3.3.2.
Situation: I have a class with three subclasses mapped as single table inheritance. I am working on legacy data, so I can't change the schema.
In the superclass I use the properties element to have a target for property-ref for another class:
Code:
<properties name="mandantFilialeOrganization" unique="true">
<property name="mandant" type="integer" column="mandant"></property>
<property name="filiale" type="integer" column="filiale"></property>
<property name="organization" type="integer" column="organization"></property>
</properties>
This is working more or less (for the less part see the link above).
Now I need a target for a property-ref from another class that doesn't know the filiale element. So i would need this:
Code:
<properties name="mandantOrganization" unique="true">
<property name="mandant" type="integer" column="mandant"></property>
<property name="organization" type="integer" column="organization"></property>
</properties>
Of course I can't do that since I would have multiple definitions of the same property.
All of the subclasses have the properties mentioned here, but when using property-ref I know which subclass to target.
So I tried moving the different <properties> definitions to the respective subclasses which would solve my problem.
Unfortunately subclass seems to support only <property> but not <properties>.
Is there another way to do this? And is there a reason why subclass won't support this element?
Thank you
Best regards
Tobias