Hello All.
Hibernate version:3.1
I need to mapping of the next objects and have small problem:
if made mapping over <array>, that hibernate need in column for indexes of array (<index> / <list-index>), but in my case it's imposible, because classes generated by build script. What can i do ?
class ViewData {
String key; //primary key
ResponseData[] array;
}
class ResponseData {
String key; //primary key
String viewDataKey; //foreign key
}
<class name="ViewData" table="ViewData">
<id name="key" column="ViewKey" type="string" length="50" />
<array name="responseData" cascade="all" fetch="join">
<key column="VIEW_KEY"/>
<index column="aid"/>
<one-to-many class="ResponseData" />
</array>
</class>
<class name="ResponseData" table="ResponseData">
<id name="key" column="IRDKey" type="string" length="50" />
<property name="viewKey" column="VIEW_KEY" length="50"
type="string" />
</class>
Thx for the help
|