Hello..
Fluent NHibernate Generates invalid columns names within a Many to one relationship.
enter public EmployeeMap()
{
Id(x => x.EmployeeID);
Map(x => x.FirstName);
Map(x => x.LastName);
Map(x => x.City);
Map(x => x.HireDate);
Map(x => x.Title);
HasMany(x => x.Orders)
.WithForeignKeyConstraintName("EmployeeID")
.Inverse()
.Cascade.All();
}
The resulting HBM:
<bag name="Orders" inverse="true" cascade="all">
<key foreign-key="EmployeeID" column="Employees_id" />
<one-to-many class="FluentWeb.Domain.Orders, FluentWeb, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
</bag>
Notice the "Employees_id". I have seen other post where people where using a method "WithKeyColumn("EmployeeID"). This method is unavailable. What can I do?
Thanks