Alex Rivera | Logout

How do you map an enum as an int value with fluent NHibernate?

Asked 2009-01-13T13:50:43.543
88

Question says it all really, the default is for it to map as a string but I need it to map as an int.

I'm currently using PersistenceModel for setting my conventions if that makes any difference.

Update Found that getting onto the latest version of the code from the trunk resolved my woes.

Edit
Report

1 Answer

0

You could create an NHibernate IUserType, and specify it using CustomTypeIs<T>() on the property map.

answered 2009-01-13T15:57:52.693

Your Answer