It's cool, but 1. Assignment will be to work three times slower. 2. This violates the principles of OOP. 3. Will not work for sigle association.
On 7 май, 18:31, "Richard Brown \(gmail\)" <[email protected]> wrote: > Thought I'd mention - you can encapsulate the collection in your domain > while mapping it in NHibernate using: > > public class SomeBusinessEntity > { > private IList<ItemEntity> items = new List<ItemEntity>(); > > public virtual IEnumerable<ItemEntity> Items > { > get { return items; } > protected set { items = (IList<ItemEntity>)value; } > } > > This makes it both encapsulated (only exposed as IEnumerable), but also > mapped through NHibernate. > > -- > 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 > athttp://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.
