Hello,
Hibernate version: 3.2.5.ga
I use a collection of dependent objects with :
Code:
<class entity-name="PARENT" table="PARENT">
<tuplizer entity-mode="dynamic-map" class="MyTuplizer"/>
...
<map name="childs"
table="CHILDS"
cascade="save-update,delete">
<key>
<column name="PARENT_ID"/>
</key>
<map-key column="CHILD_NAME" type="string"/>
<composite-element class="ChildClass">
<property name="id" column="CHILD_ID" type="long" not-null="true" />
<property name="string" column="CHILDE_ATTRIBUTE" type="string" />
</composite-element>
</map>
...
</class>
I use my own tuplizer to map the child attributes as plain attributes of the parent. This works good.
Now my problem:
The setting class="ChildClass" has to be set but seems to be ignored. Inside of the Setter of the tuplizer the returned object is only a HashMap with "id" and "string". This makes it complicated to implement. Why is a HashMap returned and not the ChildClass?
I would like to implement the ChildClass as a POJO without the Map-interface and use this?
regards