Actually, that's exactly the way to solve the problem, and the intention of conventions. Kudos. - nick
2010/6/2 Roberto Hernández <rhernan...@gmail.com> > Seems like I solved my own issue. I would still appreciate some advice, to > figure out if this is recommended. > > The solution was I wrote a custom AutoMappingConfiguration where I override > the ShouldMap(Member member) method: > > public override bool ShouldMap(FluentNHibernate.Member member) { > return member.IsProperty && member.CanWrite && base.ShouldMap(member); > } > > That way ReadOnly properties are all excluded from AutoMapping. > > Regards, > > Roberto.- > > > On Wed, Jun 2, 2010 at 12:03 PM, Roberto <rhernan...@gmail.com> wrote: > >> Is there a good way to disable auto mapping of ReadOnly properties. >> >> Regards, >> >> Roberto.- >> >> SORT OF LIKE THIS >> -------------------------------------- >> ConventionBuilder.Property.When(prop => prop.Expect(c => c.ReadOnly), >> prop => prop.<<WHAT TO DO HERE?>> ) >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Fluent NHibernate" group. >> To post to this group, send email to fluent-nhibern...@googlegroups.com. >> To unsubscribe from this group, send email to >> fluent-nhibernate+unsubscr...@googlegroups.com<fluent-nhibernate%2bunsubscr...@googlegroups.com> >> . >> For more options, visit this group at >> http://groups.google.com/group/fluent-nhibernate?hl=en. >> >> > > -- > You received this message because you are subscribed to the Google Groups > "Fluent NHibernate" group. > To post to this group, send email to fluent-nhibern...@googlegroups.com. > To unsubscribe from this group, send email to > fluent-nhibernate+unsubscr...@googlegroups.com<fluent-nhibernate%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/fluent-nhibernate?hl=en. > -- You received this message because you are subscribed to the Google Groups "Fluent NHibernate" group. To post to this group, send email to fluent-nhibern...@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.