Skip to content

MappingException: No persister for: Error

March 13, 2012

Sorry have been busy using NHibernate a lot more and haven’t had thorough time to write in the blog although lots of ideas come and go, and forgotten half of some nice tips to bear in mind.

Whenever you get this unfriendly error using NHibernate, it isn’t something wrong when you are coding in C# or the method names you expose that link to NHibernate from the public class objects.

It is in relation to the XML Mapping File which you need to double check thoroughly!

All XML Mapping files should be treated as Embedded Resources rather than Content. Simply right click on the hbm.xml file and change the option to this as its a requirement for NHibernate. XML files are then embedded into the assembly, and parsed at project startup!


From → Uncategorized

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: