Hi

First thing I though was poining out what NHibernate documentation
says. Saying that set is the best option is probably not entirely
true. If it was, there would have been no need for <bag> and <list>
whatsoever, would there? It is important to understand that set is not
always the best option.

Make sure you read http://www.nhforge.org/doc/nh/en/index.html#collections
and http://www.nhforge.org/doc/nh/en/index.html#performance-collections
carefully.

Also feel free to give us a mapping case you may be currently working
on and we'll be happy to help choose the best mapping startegy.

On 19 Mar, 23:53, José F. Romaniello <[email protected]> wrote:
> 2011/3/19 cidico <[email protected]>
>
> > Hello,
>
> > I was reading a post about the uses of bags and sets and the author
> > recommended "always use the <set> in your mapping file" and he says
> > that <set> has a lot better performance gain the using the <bag>.
>
> > My question is: Is there any problem to use the HashedSet<T> with the
> > interface ICollection<T> (native from .NET)?
>
> * You can store a HashedSet in a ICollection<T> field, and publish your
> field as ICollection or even IEnumerable.
> * Or you can store your HashedSet in a ICollection<T> property.
> * Alternatively you can pull this single file from nuget and use HashSet (of
> .net 4):
>
> http://nhforge.org/blogs/nhibernate/archive/2011/03/15/using-lt-set-g...
>
> > And why <set> is the best
> > option ?
>
> This is very well explained 
> here:http://www.nhforge.org/doc/nh/en/index.html#performance-collections

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to