Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hi!!
I am upgrading a large project to hibernate-3.0.4
I am getting stack with any-mapping that use meta-type="class":
<any name="parent" meta-type="class" id-type="long" cascade="save-update">
<column name="PARENT_ENTITY_NAME" not-null="true" length="200" unique="false" />
<column name="PARENT_PRIMARY_KEY" not-null="true" unique="false" />
</any>
there is a ClassCastException in AnyType.nullSafeSet that seems to pass a
String object (entityName) to the
ClassType.nullSafeSet which in turn cast it to
Class and fails.
Are ther any changes to the any-mapping style in hibernate-3.0?
Thanks
Hibernate version:
3.0.4
Mapping documents:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping
>
<class
name="com.mercury.dashboard.model.access.AuthorizedUser"
table="DSH_AUTHORIZED_USERS"
proxy="com.mercury.dashboard.model.access.AuthorizedUser"
dynamic-update="false"
dynamic-insert="false"
select-before-update="false"
optimistic-lock="version"
>
<id
name="authorizedUserId"
column="AUTHORIZED_USER_ID"
type="long"
unsaved-value="-1"
>
<generator class="hilo">
<!--
To add non XDoclet generator parameters, create a file named
hibernate-generator-params-AuthorizedUser.xml
containing the additional parameters and place it in your merge dir.
-->
</generator>
</id>
<version
name="version"
type="int"
column="VERSION"
access="property"
unsaved-value="undefined"
/>
<property
name="userId"
type="string"
update="true"
insert="true"
access="property"
column="USER_ID"
length="200"
not-null="true"
unique="false"
/>
<property
name="type"
type="string"
update="true"
insert="true"
access="property"
column="TYPE"
length="10"
not-null="false"
unique="false"
/>
<any name="parent" meta-type="class" id-type="long" cascade="save-update">
<column name="PARENT_ENTITY_NAME" not-null="true" length="200" unique="false" />
<column name="PARENT_PRIMARY_KEY" not-null="true" unique="false" />
</any>
</class>
</hibernate-mapping>