title: FluentNHibernate - ReadOnlyPropertyThroughCamelCaseField(Prefix.Underscore)
body: <p>Can anybody confirm that this does not work as expected, as I am getting an error that it is trying to access property rather then trying to access field.</p>
  
  <pre><code>private IList&lt;MetaPackage&gt; _metaPackages;
  public virtual IEnumerable&lt;MetaPackage&gt; MetaPackages
  {
   get
   {
      return _metaPackages;
   }
  }
  </code></pre>
  
  <p>Fluent mapping</p>
  
  <pre><code>    HasMany&lt;MetaPackage&gt;(x 
  =&gt;x.MetaPackages).Table("dnnSphere_Package").KeyColumn("Id")
   .Inverse().LazyLoad().Cascade.AllDeleteOrphan()               
  .Access.ReadOnlyPropertyThroughCamelCaseField(Prefix.Underscore)
  </code></pre>
  
  <p>Unit Test</p>
  
  <pre><code>new PersistenceSpecification&lt;MetaProject&gt;(Session)
                  .CheckProperty(x =&gt; x.Name, "Test")
                  .CheckProperty(x =&gt; x.Description, "Description")
                  .CheckList(x=&gt;x.MetaPackages, new List&lt;MetaPackage&gt; { new 
  MetaPackage ("name")})
                  .VerifyTheMappings();
  </code></pre>
  
  <p>Error:</p>
  
  <p>It throws an error that it cannot find Property setter, even though it should go trough a field, as it is readonly property. </p>
  
  <blockquote>
    <p>System.ArgumentException: Property set
    method not found. at
    System.Reflection.RuntimePropertyInfo.SetValue(Object
    obj, Object value,  BindingFlags
    invokeAttr, Binder binder, Object[]
    index, CultureInfo  culture) at
    System.Reflection.RuntimePropertyInfo.SetValue(Object
    obj, Object value,  Object[] index) at
    FluentNHibernate.Testing.PersistenceSpecification<code>1.ListValue</code>1.SetValue(Ob
    ject target) in
    E:\Users\epitka\Documents\DEVELOPMENT\fluent-
    nhibernate\src\FluentNHibernate\Testing\PersistenceSpecification.cs:
    line  174</p>
  </blockquote>
  
  <p>If if switch strategy to use ReadOnlyPropertyTrhoughPascalCaseField it correctly throws this error:</p>
  
  <blockquote>
    <p>NHibernate.PropertyNotFoundException:
    Could not find field '_MetaPackages' 
    in class
    'dnnSphere.Meta.Model.MetaProject'</p>
  </blockquote>
  
  <p>So it seems that ReadOnlyPropertyThroughCamelCaseField(Prefix.Underscore) is mapping it incorrectly to property rather then to a field.</p>