forked from nhibernate/nhibernate-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCustomer.hbm.xml
executable file
·54 lines (38 loc) · 1.99 KB
/
Customer.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
<?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="Customer" table="Customers">
<id name="CustomerId" column="CustomerId" type="string" unsaved-value="-1"
access="field.camelcase-underscore">
<generator class="assigned" />
</id>
<property name="CompanyName" column="CompanyName" type="string" length="40"
not-null="true" access="field.camelcase-underscore"/>
<property name="ContactName" column="ContactName" type="string" length="30"
access="field.camelcase-underscore"/>
<property name="ContactTitle" column="ContactTitle" type="string" length="30"
access="field.camelcase-underscore"/>
<component name="Address" class="NHibernate.DomainModel.Northwind.Entities.Address, NHibernate.DomainModel"
access="field.camelcase-underscore" insert="true" update="true">
<property name="Street" column="Address" type="string" length="60"
access="field.camelcase-underscore"/>
<property name="City" column="City" type="string" length="15"
access="field.camelcase-underscore"/>
<property name="Region" column="Region" type="string" length="15"
access="field.camelcase-underscore"/>
<property name="PostalCode" column="PostalCode" type="string" length="10"
access="field.camelcase-underscore"/>
<property name="Country" column="Country" type="string" length="15"
access="field.camelcase-underscore"/>
<property name="PhoneNumber" column="Phone" type="string" length="24"
access="field.camelcase-underscore"/>
<property name="Fax" column="Fax" type="string" length="24"
access="field.camelcase-underscore"/>
</component>
<set name="Orders" lazy="true" access="field.camelcase-underscore"
cascade="all-delete-orphan" inverse="true">
<key column="CustomerId"/>
<one-to-many class="Order"/>
</set>
</class>
</hibernate-mapping>