I have tried using the Reveal property in Fluent but I can't get it to compile with a collection. I want one of my collections in an entity to be protected and not accessible anywhere except in the entity itself. Is this possible? Thanks
Edit:
Here's the code I'm trying to use,
HasMany<Trip>(x => Reveal.Property<Trip>("_trips"));
I've also tried this code as well,
HasMany<Trip>(Reveal.Property<Organization>("_trips"));
Everytime my app runs, NHibernate says it can't map to "Property" or it throws an unknown exception.
Assuming that Organization has a IList<Trip> the
HasMany<Trip>(Reveal.Property<Organization>("_trips"));
code should work. Check that it's a property and that you have protected getters and setters (privates will not work, since NHibernate will want to proxy the collection for lazyloading).