How do I specify with fluent NHibernate mapping for a table that doesn't have an identity column?
I want something like this:
public sealed class CustomerNewMap : ClassMap<CustomerNew>, IMap
{
public CustomerNewMap()
{
WithTable("customers_NEW");
Not.LazyLoad();
Not.Id(); // this is invalid...
Map(x => x.Username);
Map(x => x.Company);
}
}
I mean no primary key defined in the database (not much defined in the database).
Best Answer
I found the answer to be: