-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: problem with mapping array of objects
PostPosted: Mon Jun 12, 2006 12:13 pm 
Newbie

Joined: Tue Nov 15, 2005 8:12 am
Posts: 3
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.