Any help with regards to this issue is much appreciated.

Notice that the <many-to-one> mapping for HCPAddress has two columns
in the definition.  If I do not set insert="false" and update="false"
on either the HCPAddress mapping or the HealthcareProfessional <many-
to-one> Mapping I get the "'Invalid Index N for this
SqlParameterCollection" error.  The problem is, which ever mapping has
it set won't get persisted.

<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" default-
lazy="true"
namespace="Domain.People.HealthcareProfessional.ContactNumbers"
assembly="Domain">

        <class name="HCPContactNumber" table="leadcontactnum" lazy="true">

                <id name="leadcontactnum_id" access="field.lowercase-underscore"
type="Int32">
                        <generator class="NHibernateServices.NextSequence,
NHibernateServices">
                                <param name="KeyName">leadcontactnum</param>
                        </generator>
                </id>

                <version name="version" access="field.lowercase-underscore"
type="Int32" unsaved-value="null" />

                <many-to-one name="hcp" access="field.lowercase-underscore"
column="lead_id"
class="Domain.People.HealthcareProfessional.HealthcareProfessional,
Domain" not-null="true" insert="false" update="false" />
                <many-to-one name="client" access="field.lowercase-underscore"
column="client_id" class="Domain.Client, Domain" lazy="false" />

                <many-to-one name="address" access="field.lowercase-underscore"
class="Domain.People.HealthcareProfessional.Address.HCPAddress,
Domain" not-found="ignore">
                        <column name="facility_id" />
                        <column name="lead_id" />
                </many-to-one>

                <property name="contactnumtype_id" access="field.lowercase-
underscore"
type="Domain.People.HealthcareProfessional.ContactNumbers.HCPContactNumType,
Domain" />

                <property name="updatedby_employee_id" access="field.lowercase-
underscore" type="Int32"  />
                <property name="contactnum" access="field.lowercase-underscore"
type="String" not-null="true" />
                <property name="primary_flag" 
access="field.lowercase-underscore"
type="Boolean" not-null="true" />
                <property name="contact_flag" 
access="field.lowercase-underscore"
type="Boolean" not-null="true" />
                <property name="checknum_flag" 
access="field.lowercase-underscore"
type="Boolean" />
                <property name="checknumdate" 
access="field.lowercase-underscore"
type="DateTime" />

        </class>

</hibernate-mapping>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to