Map Enum as Int with Fluent NHibernate and NHibernate 3

前端 未结 3 654
小鲜肉
小鲜肉 2020-12-29 05:00

I used this How do you map an enum as an int value with fluent NHibernate? to map in the past but I\'ve recently upgraded to NHibernate 3 and this doesn\'t seem to work anym

3条回答
  •  再見小時候
    2020-12-29 05:20

    Simply doing Map( m => m.MyEnum ).CustomType() seems to work just fine now.

    If anyone knows why IUserTypeConvention doesn't work with Fluent NHibernate in NHibernate 3, I'd still like to know why. Maybe it's because mapping the custom type to the enum works now, but why wasn't it removed from the lib then?

提交回复
热议问题