Hibernate version:
3.0 release
Mapping documents:
Code:
<hibernate-mapping package="com.llic.calc.variable">
<joined-subclass name="DatabaseVariable" table="DatabaseVariable" extends="Variable">
<key column="variableId"/>
<property name="className" column="className" type="string"/>
<property name="property" column="property" type="string"/>
<bag name="parameters" table="objectProperties" cascade="all" lazy="false">
<key column="variableId"/>
<one-to-many class="com.llic.ides.dao.impl.HibParameter"/>
</bag>
<many-to-one name="hibParam" class="com.llic.ides.dao.impl.HibParameter" cascade="all" lazy="false"/>
</joined-subclass>
</hibernate-mapping>
Code:
<hibernate-mapping package="com.llic.ides.dao.impl">
<class name="HibParameter" table="HibParameter">
<id name="id" column="parameterid" type="java.lang.Long">
<generator class="native" />
</id>
<property name="parameterName" column="parameterName" type="string"/>
<property name="operand" column="operand" type="int" not-null="true"/>
<property name="value" column="value" type="com.llic.calc.dao.hibernate.type.ObjectTypePersister"/>
</class>
</hibernate-mapping>
Code between sessionFactory.openSession() and session.close():
session.merge(obj); //where obj is an instance of idesdata
Full stack trace of any exception that occurs:
None
Name and version of the database you are using:
MySQL 4.0
When my usertype is called for the object "value" then the value of the object in every call is null. Using the debugger, I can clearly see that the "entity.value" object is an instanciated java.util.Date object. It appears that the call to persister.getPropertyValues(entity, source.getEntityMode()) on line 230 of DefaultMergeEventListener is returning a null for the "value" field in the Object array. How can I get around this? I have a few other custom persisters that are working fine, this really has me stumped....