Hi,
I used the following mapping in Hibernate 3.2 successfully. However, in Hibernate 3.3.1 GA I receive a "property not found" error:
(org.hibernate.MappingException: property [address] not found on entity [com.company.hibernate.ServerImpl])
Do I have to use a different mapping now?
Or should HbmBinder.bindCollectionSecondPass use collection.getOwner().getReferencedProperty(property).getValue() instead of getRecursiveProperty in line 2429?
I have a class Server, a subclass ServerImpl and a referenced class User.
ServerImpl uses the property Server.address to find all users that have been used the server via User.last_used_address
Code:
<hibernate-mapping default-access="field"
package="com.company">
<class name="User" table="USER">
<id name="id" type="java.lang.Long" column="USER_ID" />
<property name="lastUsedAddress" type="string" column="LAST_USED_ADDRESS" />
</class>
<class name="Server" table="SERVER" abstract="true">
<id name="id" type="java.lang.Long" column="SERVER_ID" />
<discriminator column="SERVER_TYPE"/>
<property name="serverType" type="string" column="SERVER_TYPE" />
<property name="address" unique="true" type="string" column="ADDRESS" />
</class>
<subclass name="ServerImpl" extends="Server" discriminator-value="1">
<!-- all users that have used this server -->
<set name="users" lazy="true" >
<key property-ref="address">
<column name="LAST_USED_ADDRESS"/>
</key>
<one-to-many class="User"/>
</set>
</subclass>
</hibernate-mapping>