Maybe I'm asking a dumb question but I'm new to NHibernate.
Having just downloaded NHibernate version 1.2.0.GA and trying to make a simple thing work.
This mapping gives me MappingException "Could not compile the mapping document: NHibernateTest.Organization.hbm.xml" without any explanation.
The problem is with the "<bag/>" thing. If I remove it - everything is ok.
Can anyone explain me what's wrong in this code?
Code:
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="NHibernateTest" namespace="NHibernateTest">
<class name="Organization" table="[Organization]">
<id name="Id" type="Guid">
<generator class="guid.comb" />
</id>
<property name="Name" type="String" length="255"/>
<many-to-one name="Group" class="OrganizationGroup" column="GroupId"/>
</class>
<class name="OrganizationGroup" table="[Organization.Group]">
<id name="Id" type="Guid">
<generator class="guid.comb" />
</id>
<property name="Name" type="String" length="255"/>
<bag name="Origanizations" inverse="true">
<key column="GroupId" />
<one-to-many class="Organization" />
</bag>
</class>
</hibernate-mapping>