Hi,
I ve been trying to work out an any relation but I have an issue with the meta value :
Code:
<any name="handler" meta-type="string" id-type="long" cascade="all">
<meta-value value="A" class="A"/>
<meta-value value="B" class="B"/>
<column name="handlerType"/>
<column name="handlerId"/>
</any>
Code:
<class name="A" table="A">
<id name="handlerId" column="handlerId">
<generator class="native"/>
</id>
</class>
<class name="B" table="B">
<id name="handlerId" column="handlerId">
<generator class="native"/>
</id>
</class>
I use a setHandler() method in java to assign the handler. All the handler A and B inherit from a Handler class. What i dont understand is why the column handlerType is null in the database and the handlerId is correctly assigned the correct value.
Thanks for your help.