I have a composite collection mapped to its parent object. In my code I pull out the parent object. Read some data off of it and then I use that data to make a new object which I add to the session. When I go to commit the transaction I get the error:
Code:
Unknown entity class: Haochanpin.KeyTerm
Does anyone have any idea of what I am doing wrong here? Does KeyTerm need its own mapping file?
dru
Mapping
Code:
<class name="Haochanpin.Page,Haochanpin" table="Page">
<id name="Id" type="Guid" column="Id" unsaved-value="00000000-0000-0000-0000-000000000000">
<generator class="guid" />
</id>
<property name="CompanyName" type="String" />
<set name="Terms"
table="Page_KeyTerm"
inverse="true"
cascade="all-delete-orphan"
access="NHibernate.Generics.GenericAccessor,NHibernate.Generics">
<key column="PageId" />
<composite-element class="Haochanpin.KeyTerm,Haochanpin">
<property name="Id" type="Guid" />
<property name="Chinese" type="String" />
<property name="English" type="String" />
</composite-element>
</set>
</class>