Hi,
I have what appears to be a simple question, but all my searching was without any success, so I hope that you can help me out:
In my HBM I define a map containing a composite element and I would like to add the key value of the map as a read-only property (with only a getter, no constructor parameter and no setter) to the child class, but I can't figure out how this can be achieved.
The simplified code below refers to my use-case with products including multi-language descriptions.
Code:
<class name="Product" table="product">
...
<map name="descriptions" table="productdescription" fetch="join">
<key column="productid" />
<map-key column="language" type="string" />
<composite-element class="ProductDescription">
<property name="short" type="string" />
<property name="long" type="string" />
</composite-element>
</map>
</class>
Thanks in advance for your help.[/code]