title: Why does Fluent NHibernate AutoMappings add an underscore to Id (e.g. Entity_id)?
body: <p>Hi using fluent nibernate automappings </p>
  
  <p>to map this</p>
  
  <pre><code>    public virtual int Id { get; set; }
      /*...snip..*/
      public virtual MapMarkerIcon MapMarkerIcon { get; set; }
  }
  </code></pre>
  
  <p>to this</p>
  
  <pre><code>CREATE TABLE [Attraction](
      [Id] [int] IDENTITY(1,1) NOT NULL,
      [MapMarkerIconId] [int] NULL
  )
  </code></pre>
  
  <p>with this:</p>
  
  <pre><code>var cfg = Fluently.Configure()
  
  
              .Database(MsSqlConfiguration.MsSql2005.ConnectionString(connectionString)
                  .DefaultSchema("xxx"))
  
              .Mappings(m =&gt;
                            {
                                m.AutoMappings
                                    .Add(
                                    AutoMap.AssemblyOf&lt;Partner&gt;().Where(
                                        n =&gt; n.Namespace == "xxx.Core.Domain")
  
                                    );
  
                                m.FluentMappings.Conventions.Add(PrimaryKey.Name.Is(x =&gt; "Id"),
                                                                 DefaultLazy.Always(),
                                                                 ForeignKey.EndsWith("Id")
                                    );
                            }
  
  
              )
  
              .ExposeConfiguration(c =&gt; c.SetProperty(Environment.ReleaseConnections, "on_close"))
              .ExposeConfiguration(c =&gt; c.SetProperty(Environment.ProxyFactoryFactoryClass, typeof(ProxyFactoryFactory).AssemblyQualifiedName))
              .BuildConfiguration();
  </code></pre>
  
  <p>Why do I get </p>
  
  <blockquote>
    <p>Server Error in '/XXX.Web'
    Application. Invalid column name
    'MapMarkerIcon_id'.</p>
  </blockquote>
  
  <p>How can I make fluentnibernate use MapMarkerIconId instead of MapMarkerIcon_id?</p>