title: NHibernate 3.2 - Do all properties now require a "set" method?
body: <p>We recently upgraded our Automapped FNH / NH project to NH 3.2, and are running into a lot of problems.</p>
  
  <p>We have a lot of properties in our object model that only have a "getter", e.g.</p>
  
  <pre><code>    public virtual float Polydispersity
      {
          get { return MeasurementRun.PolyDispersity; }
      }
  </code></pre>
  
  <p>This used to work fine, but now we get "Could not find a setter for property" errors.  </p>
  
  <p>This was hard to find, because for some reason the automapping was silently failing to create the DB tables, leading to "no persister" errors when saving to the DB - see <a href="https://stackoverflow.com/q/8041881/102554">this</a> for details.</p>
  
  <p>Is this because LinFu is now built into NH?  I know private setters no longer work, and this seems to be a similar problem.</p>
  
  <p>We used to use Castle, and I really like that NH doesn't require all those other DLLs now, but not if it breaks a big part of our object model.</p>
  
  <p>Any suggestions on how to get around this?</p>
  
  <p><strong>Stack Trace</strong></p>
  
  <blockquote>
    <p>FluentNHibernate.Cfg.FluentConfigurationException: An invalid or
    incomplete configuration was used while creating a SessionFactory.
    Check PotentialReasons collection, and InnerException for more detail.</p>
    
    <p>---> NHibernate.PropertyNotFoundException: Could not find a setter
    for property 'Polydispersity' in class
    'BI_OverlordDlsAppCore.OfeDlsMeasurement'    at
    NHibernate.Properties.BasicPropertyAccessor.GetSetter(Type type,
    String propertyName)    at NHibernate.Mapping.Property.GetSetter(Type
    clazz)    at
    NHibernate.Tuple.Entity.PocoEntityTuplizer.BuildPropertySetter(Property
    mappedProperty, PersistentClass mappedEntity)    at
    NHibernate.Tuple.Entity.AbstractEntityTuplizer..ctor(EntityMetamodel
    entityMetamodel, PersistentClass mappingInfo)    at
    NHibernate.Tuple.Entity.PocoEntityTuplizer..ctor(EntityMetamodel
    entityMetamodel, PersistentClass mappedEntity)    at
    NHibernate.Tuple.Entity.EntityEntityModeToTuplizerMapping..ctor(PersistentClass
    mappedEntity, EntityMetamodel em)    at
    NHibernate.Tuple.Entity.EntityMetamodel..ctor(PersistentClass
    persistentClass, ISessionFactoryImplementor sessionFactory)    at
    NHibernate.Persister.Entity.AbstractEntityPersister..ctor(PersistentClass
    persistentClass, ICacheConcurrencyStrategy cache,
    ISessionFactoryImplementor factory)    at
    NHibernate.Persister.Entity.JoinedSubclassEntityPersister..ctor(PersistentClass
    persistentClass, ICacheConcurrencyStrategy cache,
    ISessionFactoryImplementor factory, IMapping mapping)    at
    NHibernate.Persister.PersisterFactory.CreateClassPersister(PersistentClass
    model, ICacheConcurrencyStrategy cache, ISessionFactoryImplementor
    factory, IMapping cfg)    at
    NHibernate.Impl.SessionFactoryImpl..ctor(Configuration cfg, IMapping
    mapping, Settings settings, EventListeners listeners)    at
    NHibernate.Cfg.Configuration.BuildSessionFactory()    at
    FluentNHibernate.Cfg.FluentConfiguration.BuildSessionFactory()    ---
    End of inner exception stack trace ---    at
    FluentNHibernate.Cfg.FluentConfiguration.BuildSessionFactory()    at
    BI_OverlordPackageCore.OfeDatabase.CreateSqliteSessionFactory() in
    C:\Bicw_Dev\Bic.Net\Private Projects\NHibernate\FNH 1.3 Mapping
    Bug\OfeDatabase.cs:line 192    at
    BI_OverlordPackageCore.OfeDatabase.GetMainSession() in
    C:\Bicw_Dev\Bic.Net\Private Projects\NHibernate\FNH 1.3 Mapping
    Bug\OfeDatabase.cs:line 147    at
    BI_OverlordPackageCore.OfeDatabase.Initialize(Assembly[] assemblies)
    in C:\Bicw_Dev\Bic.Net\Private Projects\NHibernate\FNH 1.3 Mapping
    Bug\OfeDatabase.cs:line 305    at
    FNH_1._3_Mapping_Bug.Form1.button1_Click(Object sender, EventArgs e)
    in C:\Bicw_Dev\Bic.Net\Private Projects\NHibernate\FNH 1.3 Mapping
    Bug\Form1.cs:line 23    at
    System.Windows.Forms.Control.OnClick(EventArgs e)    at
    System.Windows.Forms.Button.OnClick(EventArgs e)    at
    System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)    at
    System.Windows.Forms.Control.WmMouseUp(Message&amp; m, MouseButtons
    button, Int32 clicks)    at
    System.Windows.Forms.Control.WndProc(Message&amp; m)    at
    System.Windows.Forms.ButtonBase.WndProc(Message&amp; m)    at
    System.Windows.Forms.Button.WndProc(Message&amp; m)    at
    System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp; m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp;
    m)    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32
    msg, IntPtr wparam, IntPtr lparam)</p>
  </blockquote>