<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
  <class name="Spring.Northwind.Domain.Order, Spring.Northwind.Dao" table="Orders" lazy="false">
    <id name="Id" type="Int32" unsaved-value="0">
      <column name="OrderID" sql-type="int" not-null="true" unique="true" index="PK_Orders"/>
      <generator class="native" />
    </id>
    <property name="OrderDate" type="DateTime">
      <column name="OrderDate" sql-type="datetime" not-null="false" index="OrderDate"/>
    </property>
    <property name="RequiredDate" type="DateTime">
      <column name="RequiredDate" sql-type="datetime" not-null="false"/>
    </property>
    <property name="ShippedDate" type="DateTime">
      <column name="ShippedDate" sql-type="datetime" not-null="false" index="ShippedDate"/>
    </property>
    <!--
    <property name="Freight" type="Decimal">
      <column name="Freight" sql-type="money" not-null="false"/>
    </property>
    -->
    <property name="ShipName" type="String">
      <column name="ShipName" length="40" sql-type="nvarchar" not-null="false"/>
    </property>
    <property name="ShipAddress" type="String">
      <column name="ShipAddress" length="60" sql-type="nvarchar" not-null="false"/>
    </property>
    <property name="ShipCity" type="String">
      <column name="ShipCity" length="15" sql-type="nvarchar" not-null="false"/>
    </property>
    <property name="ShipRegion" type="String">
      <column name="ShipRegion" length="15" sql-type="nvarchar" not-null="false"/>
    </property>
    <property name="ShipPostalCode" type="String">
      <column name="ShipPostalCode" length="10" sql-type="nvarchar" not-null="false" index="ShipPostalCode"/>
    </property>
    <property name="ShipCountry" type="String">
      <column name="ShipCountry" length="15" sql-type="nvarchar" not-null="false"/>
    </property>
      
    <bag name="OrderDetails" inverse="true" lazy="true" cascade="all" access="field.camelcase">
      <key column="OrderID"/>
      <one-to-many class="Spring.Northwind.Domain.OrderDetail, Spring.Northwind.Dao"/>
    </bag>
      
    <!--
    <many-to-one name="Customer" class="Spring.Northwind.Domain.Order, Spring.Northwind.Dao">
      <column name="CustomerID" length="5" sql-type="nchar" not-null="false" index="CustomerID"/>
    </many-to-one>
    -->
  </class>
</hibernate-mapping>
