(included [email protected])
You are free to model your collection as a private or protected class
member, then expose only the public methods you want to add/remove etc.
 When you're mapping you have to specify the access strategy, see
http://www.hibernate.org/hib_docs/nhibernate/1.2/reference/en/html/mapping.html
(table
5.1).


On Tue, Feb 24, 2009 at 10:44 AM, yerocdotnet <[email protected]> wrote:

> I've been reading through books and sample code and understand that an
> object's internal list should be immutable.  It can be viewed as a
> ReadOnlyCollection, but separate methods should be used to add,
> remove, etc.
>
> My question pertains to using NHibernate and/or ActiveRecord with such
> an architecture.  How can I map a "HasMany" relationship to a list of
> child objects without making that list publicly accessible?  I'm sure
> I'm missing something obvious.
>

--~--~---------~--~----~------------~-------~--~----~
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