forked from nhibernate/nhibernate-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathContractVariation.hbm.xml
89 lines (83 loc) · 2.76 KB
/
ContractVariation.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<?xml version="1.0"?>
<hibernate-mapping
xmlns="urn:nhibernate-mapping-2.2"
namespace="NHibernate.Test.Immutable"
assembly="NHibernate.Test">
<class name="Info" mutable="true">
<id name="Id">
<generator class="increment" />
</id>
<property name="Text" />
</class>
<class name="Plan" table="tbl_plan" mutable="false">
<id name="Id">
<generator class="increment" />
</id>
<property name="Description" not-null="true" />
<set name="Contracts" table="plan_contract" inverse="false" mutable="true" cascade="all" fetch="join">
<key column="col_plan" />
<many-to-many column="contract" class="Contract" />
</set>
<set name="Infos" inverse="false" mutable="true" cascade="all-delete-orphan">
<key column="col_plan" />
<one-to-many class="Info" />
</set>
</class>
<class name="Party" mutable="false">
<id name="Id">
<generator class="increment" />
</id>
<!-- <many-to-one name="contract" update="false" insert="false" /> -->
<many-to-one name="Contract" not-null="false" />
<property name="Name" not-null="true" />
<set name="Infos" inverse="false" mutable="true" cascade="all-delete-orphan">
<key column="party" />
<one-to-many class="Info" />
</set>
</class>
<class name="Contract" mutable="false">
<id name="Id">
<generator class="increment" />
</id>
<property name="CustomerName" not-null="true" />
<property name="Type" not-null="true" />
<bag name="Variations" inverse="true" order-by="version asc" mutable="false" cascade="all" fetch="join">
<key column="contract" />
<one-to-many class="ContractVariation" />
</bag>
<!-- <many-to-one name="parent" /> -->
<many-to-one name="Parent" update="false" insert="false" />
<set name="Subcontracts" inverse="false" mutable="true" cascade="all" fetch="join">
<key column="parent" />
<one-to-many class="Contract" />
</set>
<set name="Plans" table="plan_contract" inverse="true" mutable="true" cascade="none">
<key column="contract" />
<many-to-many column="col_plan" class="Plan" />
</set>
<set name="Parties" inverse="true" mutable="true" cascade="all" fetch="join">
<key column="contract" />
<one-to-many class="Party" />
</set>
<set name="Infos" inverse="false" mutable="true" cascade="all-delete-orphan">
<key column="contract" />
<one-to-many class="Info" />
</set>
</class>
<class name="ContractVariation" mutable="false">
<composite-id>
<key-many-to-one name="Contract" />
<key-property name="Version" />
</composite-id>
<property name="Text">
<column name="Text"/>
</property>
<set name="Infos" inverse="false" mutable="true" cascade="all-delete-orphan">
<key>
<column name="Contractvariation" />
<column name="Version" />
</key>
<one-to-many class="Info" />
</set>
</class>
</hibernate-mapping>