I want to create a convention for column names using Fluent NHibernate auto mapping. There is a blog entry that states that property conventions can be set like this:
ConventionBuilder.Property.When(
x => x.Property.PropertyType == typeof(int),
x => x.ColumnName(x.Property.Name + "Num")
)
But the problem is, that x only has a ColumnNames property and has no ColumnName method. How can I change the property mapping conventions using the new style configuration?
(P.S: I’m using the latest binary avaialable on the site as of today)
Okay… it seems they changed from the ColumnName property to a ColumnNames list. You have to add your columnname to this list like this: