My apologies if this is a duplicate, the original seems to have vanished.
I can't get a component to map. The following XML compiles if the component and /component lines are commented out (as shown), but does not compile if they are present (as desired). I am clearly doing something stupid, but of course cannot tell what. Any hints?
Thanks,
Brian Hetrick
Code:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
<class lazy="false" name="MyProject.Draw, MyProject"
optimistic-lock="version" table="Draw">
<id access="field" column="ID" name="m_id" type="int" unsaved-value="0">
<generator class="identity" />
</id>
<version access="field" column="Version" name="m_version" type="int" unsaved-value="0" />
<many-to-one access="MyProject.DAO.NoSetterCamelCaseMUnderscore, MyProject"
class="MyProject.CirculationSet, MyProject" column="CirculationSet"
name="CirculationSet" not-null="true" />
<property column="Created" name="Created" type="DateTime" />
<property column="PaidCirculation" name="PaidCirculation" type="int" />
<property column="SampleCirculation" name="SampleCirculation" type="int" />
<property column="ServiceCirculation" name="ServiceCirculation" type="int" />
<!--
<component name="TargetAtom" class="MyProject.TargetAtom, MyProject" >
-->
<many-to-one access="MyProject.DAO.NoSetterCamelCaseMUnderscore, MyProject"
cascade="all" class="MyProject.BaseZone, MyProject"
column="BaseZone" name="BaseZone" not-found="exception" />
<bag access="MyProject.DAO.NoSetterCamelCaseMUnderscore, MyProject"
cascade="all"
collection-type="MyProject.Collections.PPSSetFactory`1[[MyProject.TargetAtom]], MyProject"
inverse="false" lazy="true" name="TargetAtom" table="Relation_Draw_TargetAtom">
<key column="Draw" />
<element column="TargetAtom" type="MyProject.TargetAtom, MyProject"
not-null="true" />
</bag>
<!--
</component>
-->
</class>
</hibernate-mapping>