I have a class with IList<Role> roles
as a property which is mapped by the following code:
map.HasMany(u=>u.roles).Element("role").Cascade.All()
but this maps roles
to a column of int
but I want it to be mapped to a column of string
.
I have a class with IList<Role> roles
as a property which is mapped by the following code:
map.HasMany(u=>u.roles).Element("role").Cascade.All()
but this maps roles
to a column of int
but I want it to be mapped to a column of string
.
use the override to specify the NHibernate.Type explicitly
.Element("role", e => e.Type<NHibernate.Type.EnumStringType<Role>>())