Mapping file:
<?xml version="1.0"?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" auto-import="true">
<class name="PlayHibernate.Employee, PlayHibernate" lazy="false">
<id name="id" access="field">
<generator class="native"/>
</id>
<property name="name" access="field" column="name"/>
<many-to-one access="field" name="manager" column="manager" cascade="all"/>
</class>
</hibernate-mapping>
I tried setting the mapping file as a resource, but that just changes the error message to "Unhandled Exception: NHibernate.MappingException: PlayHibernate.Employee.hbm.xml (5,31): XML validation error: The element 'id' in namespace 'urn:nhibernate-mapp ing-2.2' cannot contain text. ---> System.Xml.Schema.XmlSchemaValidationExceptio n: The element 'id' in namespace 'urn:nhibernate-mapping-2.2' cannot contain tex t."