Joined: Wed Jul 14, 2004 5:06 am Posts: 2
|
Hi,
I would like to know if it is possible to share the definition of a <component> between different mapping files.
I am currently doing the following:
Component Comp is used by class A and B. Currently I duplicate the definition of Comp in both mapping files:
<hibernate-mapping>
<class name="A" table="a">
...
<component class="Comp" name="comp">
<property name="p1" type="string" />
...
</component>
...
</class>
</hibernate-mapping>
<hibernate-mapping>
<class name="B" table="b">
...
<component class="Comp" name="comp">
<property name="prop1" type="string" />
...
</component>
...
</class>
</hibernate-mapping>
Maintenance of the component is problematic as any changes requires an update to the mappings for A and B. Is there a way to reference a component from one mapping file to another? I've looked in the documentation and these forums but didn't find and answer.
Thanks.
David
|
|