-->
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: How to map collections of simple properties
PostPosted: Sun Aug 20, 2006 12:18 pm 
Newbie

Joined: Sun Jun 25, 2006 9:27 pm
Posts: 18
Hi,
I need to map a collection (set or list, doesn't matter) of type string - I looked in the manual but couldn't find anything that addressed this? Could you point me in the direction as to how this is annotated?

Set<String> names;

doesn't seem to work...
Any clues?

Thanks,
Joey


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 20, 2006 1:19 pm 
Newbie

Joined: Thu Mar 09, 2006 11:52 am
Posts: 13
You can do this by using a collection of values as described in the documentation under the same name. Here's a mapping for a Set of Integers:

Code:
<set name="myIntegerCollection" table="MY_INTEGER_TABLE">
   <key column="MY_FK_ID" />
   <element type="java.lang.Integer" column="MY_INTEGER_COLUMN" />
</set>


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.