harriyott.com

3 November 2009

NHibernate.MappingException

Just got this error message and had no relevant results on Google:

System.TypeInitializationException : The type initializer for 'MyApp.Repositories.NHibernateHelper' threw an exception.
----> NHibernate.MappingException : An association from the table MyTable refers to an unmapped class: MyApp.Domain.MyClass

Schoolboy error; I'd forgotten to mark the hbm.xml files as embedded resources.

1 Comments:

Blogger David Kemp said...

How many times have I done that?
I'm mostly using Fluent Nhibernate now, and you never get that problem.

Post a Comment