-->
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.  [ 2 posts ] 
Author Message
 Post subject: mapping file for a "List" corrsponding to a "
PostPosted: Thu Jun 02, 2005 1:54 pm 
Newbie

Joined: Fri May 27, 2005 1:02 am
Posts: 6
I'm using Hibernate 3.0, and all my Value Object have ArrayList in them.

The mapping is something like like I have a UserVO which has an ArrayList of CampaignVOs. Each user can have multiple campaigns. Hence my mapping file, when using a set is something like:

<Set name="campaignList" table="USERCAMPAIGN" inverse="true" lazy="true">
<key column="USERID" not-null="true"/>
<one-to-many class="com.tribalfusion.sampleapp.platform.data.CampaignVO"/>
</Set>

What is the List equivalent of this ? I'm not able to find many examples for the same. Please guide.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 02, 2005 2:42 pm 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
something like what is explained in the reference guide?

just replace <set/> with <bag/> if you don't need indexed collection, otherwise chech <list/>

_________________
Anthony,
Get value thanks to your skills: http://www.redhat.com/certification


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

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.