-->
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.  [ 6 posts ] 
Author Message
 Post subject: index property of List
PostPosted: Wed Oct 08, 2003 3:36 am 
Beginner
Beginner

Joined: Wed Aug 27, 2003 5:03 am
Posts: 34
Hi,

Is it possible to use List in my *.hbm.xml files without the index property?
And if no, what are good alternatives, i rather don't want to use a Set.

Thanx for the help.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 08, 2003 3:44 am 
Regular
Regular

Joined: Mon Sep 08, 2003 4:53 am
Posts: 70
Location: Germany
The index property is necessary, if you want to use a list in the mapping file. The alternatives of using a Set depends on
- what you want to do
- why you don't want to use a Set


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 08, 2003 3:50 am 
Beginner
Beginner

Joined: Wed Aug 27, 2003 5:03 am
Posts: 34
In the rest of my application i'm working with Lists , so i have to convert all the time from List to Set and vice versa. That is expensive time. Ok , other question.

When i'm using the id as index, is the item placed in the List on the place of the id or will it just be 0, 1, 2 ... what i hope. In other words is the index just used to sort the items or for placement in the List.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 08, 2003 3:59 am 
Regular
Regular

Joined: Mon Sep 08, 2003 4:53 am
Posts: 70
Location: Germany
The index is used for placement in the List.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 08, 2003 4:00 am 
Beginner
Beginner

Joined: Wed Aug 27, 2003 5:03 am
Posts: 34
Hmm i think i found the answer to my question:

http://www.hibernate.org/117.html#A5

This makes sence to me now, so i have to convert Lists to Sets and vice versa.

Thanks all for the help.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 08, 2003 5:42 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
Look at <bag>

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 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.