There is a sample here http://codebetter.com/blogs/jeremy.miller/archive/2006/02/20/138732.aspx
or try the suggested google search "nhibernate enum mapping" John Davidson On Fri, May 21, 2010 at 10:50 AM, Graham Bunce <[email protected]>wrote: > Hi, > > I'm trying to map a System.DayOfWeek enum to a database int field. My > mapping as as follows: > > <property name="firstDayOfTheWeek" column="FirstDayOfTheWeek" > type="System.DayOfWeek, System" not-null="true" /> > > When NH verifies the mapping I get a TypeInitializationException and a > message of: > > "Could not determine type for: System.DayOfWeek, System, for columns: > NHibernate.Mapping.Column(FirstDayOfTheWeek)" > > If I map back to an Int32 then, as expected, it works but I suspect > I'll get ghost updates when I save. > > I've copied the System.dll to the runtime directory but this doesn't > make any difference. I can't see any problems with namespaces but if I > remove change it to type="DayOfWeek, System" then NH adds the > current default namespace of the application. > > I must be doing something wrong, but I can't figure out where I'm > being stupid. Anybody got any ideas? > > -- > You received this message because you are subscribed to the Google Groups > "nhusers" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<nhusers%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/nhusers?hl=en. > > -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
