forked from nhibernate/nhibernate-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOrder.hbm.xml
executable file
·71 lines (49 loc) · 2.58 KB
/
Order.hbm.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
namespace="NHibernate.DomainModel.Northwind.Entities" assembly="NHibernate.DomainModel">
<class name="Order" table="Orders">
<id name="OrderId" column="OrderId" type="int" unsaved-value="-1"
access="field.camelcase-underscore">
<generator class="assigned" />
</id>
<many-to-one name="Customer" class="Customer" column="CustomerId" not-null="true"
access="field.camelcase-underscore" fetch="select"/>
<many-to-one name="Employee" class="Employee" column="EmployeeId"
access="field.camelcase-underscore" fetch="select"/>
<property name="OrderDate" column="OrderDate" type="DateTime"
access="field.camelcase-underscore"/>
<property name="RequiredOrderDate" formula="OrderDate" insert="false" update="false" />
<property name="RequiredDate" column="RequiredDate" type="DateTime"
access="field.camelcase-underscore"/>
<property name="ShippingDate" column="ShippedDate" type="DateTime"
access="field.camelcase-underscore"/>
<many-to-one name="Shipper" class="Shipper" column="ShipVia"
access="field.camelcase-underscore" fetch="select"/>
<property name="Freight" column="Freight" type="Decimal"
access="field.camelcase-underscore"/>
<property name="ShippedTo" column="ShipName" type="string" length="40"
access="field.camelcase-underscore"/>
<component name="ShippingAddress" class="NHibernate.DomainModel.Northwind.Entities.Address, NHibernate.DomainModel"
access="field.camelcase-underscore" insert="true" update="true">
<property name="Street" column="ShipAddress" type="string" length="60"
access="field.camelcase-underscore"/>
<property name="City" column="ShipCity" type="string" length="15"
access="field.camelcase-underscore"/>
<property name="Region" column="ShipRegion" type="string" length="15"
access="field.camelcase-underscore"/>
<property name="PostalCode" column="ShipPostalCode" type="string" length="10"
access="field.camelcase-underscore"/>
<property name="Country" column="ShipCountry" type="string" length="15"
access="field.camelcase-underscore"/>
</component>
<set name="OrderLines" lazy="true" access="field.camelcase-underscore"
cascade="all-delete-orphan" inverse="true">
<key column="OrderId"/>
<one-to-many class="OrderLine"/>
</set>
<set name="ProductIds" table="OrderLines">
<key column="OrderId" />
<element column="ProductId" type="Int32" />
</set>
</class>
</hibernate-mapping>