I have a weird problem going on. I use Hibernate 2.1.3
The base class of my class hierarchy is not being persisted properly. When I stop the debugger at AbstractEntityPersister.221 and step through the for loop, the BasicPropertyAccessors and the values do not sync up
I then get an IllegalArgumentException when the value of the 'mediaType' property, a String, is attempted to be used as the value to the call the setter for the version property 'modifiedDate', which expects a Timestamp
There are the right number of BasicPropertyAccessors and values, they are just not in the right order. Can anyone tell me how to fix this?
The mapping for the base class looks like this.
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping
package="market.media.bean">
<class name="MediaBean" table="RIGHTS_MEDIA">
<cache usage="read-write"/>
<id name="id" column="RIGHTS_MEDIA_TKEY">
<generator class="market.util.IdentifierGenerator">
<param name="sequence">RIGHTS_MEDIA_TKEY_SEQ</param>
</generator>
</id>
<version access="property" name="modifiedDate" type="market.util.TimestampDateType" column="MODIFIED_DATE"/>
<property name="mediaType" column="RIGHTS_MEDIA_TYPE"/>
<property name="backloadId" column="BACKLOAD_ID"/>
<property name="name" not-null="true" column="RIGHTS_MEDIA_NAME"/>
<property name="abbreviation" not-null="true" column="RIGHTS_MEDIA_ABBR"/>
<property name="description" column="RIGHTS_MEDIA_DESC"/>
<property name="modifiedBy" not-null="true" column="MODIFIED_BY"/>
</class>
</hibernate-mapping>
Thanks!
|