PersistenceSpecification and Enums
How does one test enum type properties with PersistenceSpecification. I have it mapped like this
Map(x => x.AccountStatus).Column("Status").CustomSqlType("int").Not.Nullable();
and I check it like this
spec.CheckProperty(o => o.AccountStatus, UserStatus.Disabled)
but it fails with this message
NHibernate.HibernateException: Can't Parse 0 as UserStatus
It does not look like it is Fluent's error message, b开发者_JAVA百科ut just saving it using Session works fine.
Any ideas?
Taking of .CustomSqlType("int") solves the problem
精彩评论