Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
2.0.0.Alpha1
<?xml version="1.0" encoding="utf-8"?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
<class name="ModelLibrary.Center,ModelLibrary" table="Centers" lazy="true">
<id name="CenterID" column="CenterID" type="System.Int32">
<generator class="native" />
</id>
<property name="ParentID" column="ParentID" type="System.Int32" not-null="false" />
<property name="CenterName" column="CenterName" type="System.String" not-null="true" />
<property name="ZipCode" column="ZipCode" type="System.String" not-null="false" />
<property name="CountyID" column="CountyID" type="System.Int32" not-null="true" />
<property name="StateID" column="StateID" type="System.Int32" not-null="true" />
<property name="CreatedOn" column="CreatedOn" type="System.DateTime" not-null="false" />
<property name="CreatedBy" column="CreatedBy" type="System.String" not-null="false" />
<property name="ModifiedOn" column="ModifiedOn" type="System.DateTime" not-null="false" />
<property name="ModifiedBy" column="ModifiedBy" type="System.String" not-null="false" />
<many-to-one name="LUCounty" class="ModelLibrary.LUCounty,ModelLibrary" column="CountyID" />
<many-to-one name="LUState" class="ModelLibrary.LUState,ModelLibrary" column="StateID" />
<bag name="Referrals" inverse="true" cascade="delete">
<key column="CenterID" />
<one-to-many class="ModelLibrary.Referral,ModelLibrary" />
</bag>
<bag name="Clients" inverse="true" cascade="delete">
<key column="CenterID" />
<one-to-many class="ModelLibrary.Client,ModelLibrary" />
</bag>
<bag name="MMCentersOrganizations" inverse="true" cascade="delete">
<key column="CenterID" />
<one-to-many class="ModelLibrary.MMCentersOrganization,ModelLibrary" />
</bag>
<bag name="UsersInCenters" inverse="true" cascade="delete">
<key column="CenterID" />
<one-to-many class="ModelLibrary.UsersInCenter,ModelLibrary" />
</bag>
<bag name="Organizations" table="MM_Centers_Organizations" cascade="all">
<key column="CenterID" />
<many-to-many column="OrganizationID" class="ModelLibrary.Organization,ModelLibrary" />
</bag>
<bag name="aspnetUsers" table="UsersInCenters" cascade="all">
<key column="CenterID" />
<many-to-many column="UserId" class="ModelLibrary.aspnetUser,ModelLibrary" />
</bag>
</class>
</hibernate-mapping>
I'm getting an "Invalid index 10 for this SqlParameterCollection with Count=10." on session.Flush() and am not quite sure what is going on. I'm pretty new to nhibernate so any help is appreciated.