If enum is primary key:
Code: Select all
CompositeId()
.KeyProperty(x => x.Section, set => {
set.Type("ExportDefColumnSection"); // bad! Does not compile by NHibernate
Code: Select all
CompositeId()
.KeyProperty(x => x.Section, set => {
set.Type(typeof(Anete.Common.Data.Nh.Entities.ExportDefColumnSection)); // ok
Code: Select all
Map(x => x.ReaderDeviceType)
.Column("typ")
.CustomType("ReaderDeviceType")) // bad!
Code: Select all
Map(x => x.ReaderDeviceType)
.Column("typ")
.CustomType(typeof(Anete.Common.Data.Nh.Entities.ReaderDeviceType)) //ok