I've searched all over for the solution to this, but no clue. I want to use an <ANY> mapping to entities that all have composite IDs:
Code:
<class name="Parent">
...
<any name="child" meta-type="integer" id-type="long,timestamp">
<meta-value value="1" class="Child1"/>
<meta-value value="2" class="Child2"/>
<column name="child_type"/>
<column name="child_id"/>
<column name="child_ts"/>
</any>
...
</class>
Children look like this:
Code:
<class name="Child1">
<composite-id>
<key-property name="id"/>
<key-property name="timestamp"/>
</composite-id>
</class>
Looks fine to me, but I get:
property mapping has wrong number of columns: Parent.child type: object
Thanks for any help!
Jen