The only way to use SETs in nhibernate is with Sets from Iesi.Collections.
Having say that your field or property type could be ICollection but the
instance in transients objetcs must be set, this is an example:
public class Invoice
{
private ISet<InvoiceLIne> lines = new HashedSet<InvoiceLine>();
public ICollection<InvoiceLine> Lines {get{return lines;}}
}
this is ok too:
public class Invoice
{
private ICollection<InvoiceLine> lines = new HashedSet<InvoiceLine>();
public ICollection<InvoiceLine> Lines {get{return lines;}}
}
but you miss sets operations.
2010/12/23 Max André Bündchen <[email protected]>
> I'm reading the NHibernate 3.0 Cookbook and a question appeared when I
> played with NHibernate. As the System.Collections.Generic.ISet is not
> supported in <set> mappings, I can use the
> Iesi.Collections.Generic.ISet or the
> System.Collections.Generic.ICollection.
>
> What's the drawback of use native ICollection instead of ISet? I found
> a few topics about it but not a clear answer.
>
> --
> 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]<nhusers%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/nhusers?hl=en.
>
>
--
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.