<hibernate-mapping>
<class name="xx" table="xTable" schema="x">
<composite-id name="id" class="xxId">
<key-property name="id" type="string">
<column name="ID" length="32" />
</key-property>
<key-property name="name" type="string">
<column name="NAME" length="7" />
</key-property>
</composite-id>
<many-to-one name="yyy" class="yy" fetch="select"> <column name="SAE_ID" length="32" />
<column name="SAE_VERSION" length="10" /> </many-to-one>
<property name="reportSection" type="string">
<column name="REPORT_SECTION" length="10" />
</property> </class>
</hibernate-mapping>
--------------------------------------
<hibernate-mapping>
<class name="yy" table="yTable" schema="y">
<composite-id name="id" class="yyId">
<key-property name="id" type="string">
<column name="ID" length="32" />
</key-property>
<key-property name="version" type="string">
<column name="VERSION" length="10" />
</key-property>
</composite-id>
<set name="xxes" inverse="true"> <key> <column name="SAE_ID" length="32" />
<column name="SAE_VERSION" length="10" /> </key>
<one-to-many class="xx" /> </set>
</class>
</hibernate-mapping>
All I need is to get SAE_ID.
But when I do this,
.add( Restrictions.eq("SAE_ID", sId))
Error:
org.hibernate.QueryException: could not resolve property: SAE_ID of: xx
|