Either Set or bag could be faster, depending upon the situation. Neither
require an <index> column. Hibernate bags are actually java.util.Lists
because the java collections framework has no Bag.




                                                                                       
                                               
                    jiesheng zhang                                                     
                                               
                    <[EMAIL PROTECTED]>                To:     [EMAIL PROTECTED]       
                      
                    Sent by:                                cc:                        
                                               
                    [EMAIL PROTECTED]       Subject:     [Hibernate] set, bag and list 
                               
                    eforge.net                                                         
                                               
                                                                                       
                                               
                                                                                       
                                               
                    30/01/03 01:00 PM                                                  
                                               
                                                                                       
                                               
                                                                                       
                                               




I have a collection of thing. I do not care whether
there is duplication or not. I can use Set to prohibit
duplication. I can also use list and bag.
If I use Set rather than list/bag, I think the
performance is not so good as it is for list/bag,
since set has to limit duplication.

I noticed that <index> tag is required for list. But
if I used linked list, I do not care about index. Can
I omit the <index> tag?

Therefore I think bag is a good choice for my
implementation: no index tag requirement and no
performance penalty from set. However where the bag is
declared? I looked through java.util.*. I did not find
it.

Thanks

jason



__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com


-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel




**********************************************************************
Any personal or sensitive information contained in this email and
attachments must be handled in accordance with the Victorian Information
Privacy Act 2000, the Health Records Act 2001 or the Privacy Act 1988
(Commonwealth), as applicable.

This email, including all attachments, is confidential.  If you are not the
intended recipient, you must not disclose, distribute, copy or use the
information contained in this email or attachments.  Any confidentiality or
privilege is not waived or lost because this email has been sent to you in
error.  If you have received it in error, please let us know by reply
email, delete it from your system and destroy any copies.
**********************************************************************





-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to