Hibernate version:3.2
I have a mapping with a set of dependent objects, which is not a standard POJO. I have defined a custom component tuplizer (which I use for component (dependent) objects inside other object mappings), but I don't see any way to define the tuplizer (Component allows you to define custom tuplizers). Below is an example mapping... Warranty is a dependent object (interface) that uses a factory to get instantiated (my tuplizer provides a custom instantiator that knows how to do this). If it is not possible to set the tuplizer here, is there anyway to globally set that all components use my custom tuplizer? My custom tupilizer will fall back on the PojoComponentTuplizer for standard POJO objects.
Code:
<set name="warranties" table="WARRANTY" lazy="true">
<key>
<column name="ID" />
</key>
<composite-element class="sample.package.Warranty">
<property name="warrantyId" type="java.lang.String">
<column name="WARRANTY_ID" length="10" />
</property>
<property name="duration" type="java.lang.Long">
<column name="DURATION" precision="22" scale="0" />
</property>
.... more properties here ....
</composite-element>
</set>
Alternatively, is there another way to map a collection (Set) of dependent (component) objects that would allow me to use the Tuplizer element?
This problem has really halted my progress, if anyone has any ideas, please assist.
Thanks.