title: Fluent NHibernate: Column mapping convention
body: <p>I'm having some problems with getting the following convention to work:</p>
  
  <pre><code>public class ColumnNameUpperConvention : IPropertyConvention
  {
      public void Apply(IPropertyInstance instance)
      {          
          string cName = instance.Property.Name.ToUpper();
          instance.Column(cName);
      }
  }
  </code></pre>
  
  <p>What I'm wanting the above code to do is to map a property called "Modified" to a column named "MODIFIED".</p>
  
  <p>And this is my config:</p>
  
  <pre><code>var config =
      Fluently.Configure()
          .Database(OracleClientConfiguration.Oracle10
          .ConnectionString(c =&gt; c.FromConnectionStringWithKey(cstringName)))
          .Mappings(m =&gt;
              {
                  m.FluentMappings.AddFromAssemblyOf&lt;AgilityObject&gt;();
                  m.AutoMappings.Add(
                          AutoMap.AssemblyOf&lt;AgilityObject&gt;(mappingConfiguration)
                         .Conventions.Add&lt;ColumnNameUpperConvention&gt;());
              })
          .ExposeConfiguration(x =&gt; x.SetProperty("current_session_context_class", "thread_static"))
          .ExposeConfiguration(x =&gt; x.SetProperty("generate_statistics", "true"))
          .BuildSessionFactory();
  </code></pre>
  
  <p>When I debug I can see that my convention code gets executed, but it doesn't seem like it actually <em>does</em> anything.</p>
  
  <p>Am I missing something?</p>
  
  <p>PS. Do the mappings I've set explicitly in a ClassMap automatically override conventions? There are exceptions to the above convention and I want to map those properties by hand.</p>