Hi,
I have created a structure like: User extends Actor, Group Extends User.
Actors can have Permissions (See below the hbm.xml).
While adding a permission to a user or group I get the IllegalArgumentException during commit().
In BasicPropertyAccessor.java[96] I can see, that Hibernate tries to execute getId() on the target Permission but methods contains the clazz Actor?!
In 2.0.2 this code was running.
Code:
<hibernate-mapping>
<class name="com.ssn.acx.api.persistence.collections.Actor" table="TestJActor" dynamic-update="true">
<id name="id" column="id" type="long">
<generator class="native">
<param name="sequence">TestJActorSEQ</param>
</generator>
</id>
<property name="name" type="string" not-null="true" unique="true"/>
<set name="permissions" table="act_perm">
<key column="permission_id"/>
<many-to-many column="actor_id" class="com.ssn.acx.api.persistence.collections.Actor"/>
</set>
<joined-subclass name="com.ssn.acx.api.persistence.collections.User" table="TestUser" dynamic-update="true">
<key column="actor_id"/>
<property name="firstname" type="string" not-null="true"/>
<set name="groups" lazy="true" table="user_groups">
<key column="user_id"/>
<many-to-many column="group_id" class="com.ssn.acx.api.persistence.collections.Group"/>
</set>
</joined-subclass>
<joined-subclass name="com.ssn.acx.api.persistence.collections.Group" table="TestGroup" dynamic-update="true">
<key column="actor_id"/>
<property name="description" type="string"/>
<set name="users" table="user_groups">
<key column="group_id"/>
<many-to-many column="user_id" class="com.ssn.acx.api.persistence.collections.User"/>
</set>
</joined-subclass>
</class>
<!-- Permission mappings -->
<class name="com.ssn.acx.api.persistence.collections.Permission" table="TestJPermission">
<id name="id" column="id" type="long">
<generator class="native">
<param name="sequence">PermissionSEQ</param>
</generator>
</id>
<property name="name" type="string" not-null="true" unique="true"/>
<property name="description" type="string"/>
</class>
</hibernate-mapping>