Okay, something is seriously wrong here. If I change the class properties to automatic, and keep the custom access, I get an error telling me that the manual backingfields for the properties are missing ("_property1" and "_property2").
On 12 Maj, 11:40, TigerShark <kenneth.siew...@gmail.com> wrote: > I'm facing a strange problem. > > I have a class with a nested component containing two properties. > My default access strategy is backing field, but for the component, > I'd like to use camelcase field. When I try to set the access strategy > explicitly for the component, I get an error telling me that the > backing field for the property, couldn't be found. > > Is this a bug? > > I can override the access strategy for properties on my normal class > maps, but not on components. > > Example mapping: > > public sealed class FooMap : ClassMap<Foo> > { > public FooMap() > { > Table("foo"); > Id(x => x.Id, "id") > .Access.CamelCaseField(Prefix.Underscore); > > Component(x => x.Bar, b => > { > b.Map(x => x.Property1, "col1") > .Access.CamelCaseField(Prefix.Underscore); // <- Fails > b.Map(x => x.Property2, "col2") > .Access.CamelCaseField(Prefix.Underscore); // <- Fails > }); > } > > } > > -- > 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 > athttp://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.