При следующем сопоставлении BillingAddress.Country отображается правильно, но ShippingAddress.Country всегда равно нулю Может это из-за равных свойств имени? но это разные объекты ... Есть идеи как это исправить?
Спасибо вперед.
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="KapsNet.QuickOffice.Models" namespace="KapsNet.QuickOffice.Dto">
<class name="Order" table="`Order`" >
<id name="ID" type="System.Int32" column="ID">
<generator class="identity"/>
</id>
<property name="CreateDate" column="CreateDate" type="System.DateTime" not-null="true" />
<property name="ClientContactID" column="ClientContactID" type="System.Int32" not-null="true" />
<component name="BillingAddress" class="AddressInfo">
<property name="Address" column="BillingAddress" type="System.String" not-null="false" length="255"/>
<property name="ZipCode" column="BillingZipCode" type="System.String" not-null="false" length="50"/>
<property name="City" column="BillingCity" type="System.String" not-null="false" length="50"/>
<property name="CountryID" column="BillingCountryID" type="System.Int32" not-null="true" />
<property name="Phone" column="BillingPhone" type="System.String" not-null="false" length="50"/>
<many-to-one name="Country" column="BillingCountryID" class="Country" update="0" insert="0" />
</component>
<component name="ShippingAddress" class="AddressInfo">
<property name="Address" column="ShippingAddress" type="System.String" not-null="false" length="255"/>
<property name="ZipCode" column="ShippingZipCode" type="System.String" not-null="false" length="50"/>
<property name="City" column="ShippingCity" type="System.String" not-null="false" length="50"/>
<property name="CountryID" column="ShippingCountryID" type="System.Int32" not-null="true" />
<property name="Phone" column="ShippingPhone" type="System.String" not-null="false" length="50"/>
<many-to-one name="Country" column="ShippingCountryID" class="Country" update="0" insert="0" />
</component>
<many-to-one name="ClientContact" column="ClientContactID" class="ClientContact" update="0" insert="0" />
<bag name="OrderItemList" table="OrderItem" inverse="true" lazy="true" cascade="delete">
<key column="OrderID" />
<one-to-many class="OrderItem"/>
</bag>
</class>
</hibernate-mapping>