Coluld you please give more details. I know how to use Access.AsField() on per property basis with ForTypesThatDeriveFrom, but I do not know how actually to use it with AutoMapping.
What I realy try to solve is automapping for "immutable" entities. Something like this: class Test { private string name; public string Name{get{return this.name;}} } On Mar 14, 7:00 pm, James Gregory <jagregory....@gmail.com> wrote: > You need to use Access.AsField() to inform FNH that the readonly property is > backed by a field. > > > > On Sat, Mar 14, 2009 at 4:48 PM, Mike Chaliy <m...@chaliy.name> wrote: > > > In our development we are frequently using readonly properties backed > > with private fields. > > > Is there any way to automap such case? > > From my walking through code this is impossible to create custom > > convention just because: > > > public virtual void mapEverythingInClass<T> > > (FluentNHibernate.AutoMap.AutoMap<T> map) > > { > > foreach (PropertyInfo property in typeof(T).GetProperties()) > > { > > this.TryToMapProperty<T>(map, property); > > } > > > } > > > Any thoughts?- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Fluent NHibernate" group. To post to this group, send email to fluent-nhibernate@googlegroups.com To unsubscribe from this group, send email to fluent-nhibernate+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/fluent-nhibernate?hl=en -~----------~----~----~----~------~----~------~--~---