forked from nhibernate/nhibernate-core
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnhibernate-configuration.xsd
More file actions
332 lines (331 loc) · 14.9 KB
/
nhibernate-configuration.xsd
File metadata and controls
332 lines (331 loc) · 14.9 KB
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
<xs:schema targetNamespace="urn:nhibernate-configuration-2.2" xmlns="urn:nhibernate-configuration-2.2" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:NS="urn:nhibernate-configuration-2.2">
<xs:annotation>
<xs:documentation>
-- This schema was automatically generated by Syntext Dtd2Schema and changed for NH use --
-- conversion tool (from file: hibernate-configuration-3.0.dtd) --
-- Copyright (C) 2002, 2003 Syntext Inc. See http://www.syntext.com for updates. --
</xs:documentation>
</xs:annotation>
<!-- Type definitions -->
<xs:element name="hibernate-configuration">
<xs:complexType>
<xs:sequence>
<xs:element ref="bytecode-provider" minOccurs="0" maxOccurs="1" >
<xs:annotation>
<xs:documentation>
There are 2 default short-cut values
- lcg : default for .NET2.0 and higher.
- null : Disable the reflection optimization completely.
In addition you can specify the AssemblyQualifiedName of your custom bytecode-provider (implementation of IBytecodeProvider).
Note: the bytecode-provider will be effective only when specified in the app.config or web.config.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element ref="reflection-optimizer" maxOccurs="1" minOccurs="0" />
<xs:element ref="session-factory" minOccurs="0" maxOccurs="1" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="class-cache">
<xs:complexType>
<xs:sequence>
</xs:sequence>
<xs:attribute name="class" type="xs:string" use="required" />
<xs:attributeGroup ref="cacheSpecification" />
<xs:attribute name="include">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="all" />
<xs:enumeration value="non-lazy" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="collection-cache">
<xs:complexType>
<xs:sequence />
<xs:attribute name="collection" type="xs:string" use="required" />
<xs:attributeGroup ref="cacheSpecification" />
</xs:complexType>
</xs:element>
<xs:element name="mapping">
<xs:annotation>
<xs:documentation>
There are 3 possible combinations of mapping attributes
1 - resource & assembly: NHibernate will read the mapping resource from the specified assembly
2 - file only: NHibernate will read the mapping from the file.
3 - assembly only: NHibernate will find all the resources ending in hbm.xml from the assembly.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attribute name="resource" />
<xs:attribute name="file" />
<xs:attribute name="assembly" />
</xs:complexType>
</xs:element>
<xs:element name="property">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="name" use="required">
<xs:simpleType>
<xs:union>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="connection.provider" />
<xs:enumeration value="connection.driver_class" />
<xs:enumeration value="connection.connection_string" />
<xs:enumeration value="connection.isolation" />
<xs:enumeration value="connection.release_mode" />
<xs:enumeration value="connection.connection_string_name" />
<xs:enumeration value="dialect" />
<xs:enumeration value="default_schema" />
<xs:enumeration value="show_sql" />
<xs:enumeration value="max_fetch_depth" />
<xs:enumeration value="current_session_context_class" />
<xs:enumeration value="transaction.factory_class" />
<xs:enumeration value="cache.provider_class" />
<xs:enumeration value="cache.use_query_cache" />
<xs:enumeration value="cache.query_cache_factory" />
<xs:enumeration value="cache.use_second_level_cache" />
<xs:enumeration value="cache.region_prefix" />
<xs:enumeration value="cache.use_minimal_puts" />
<xs:enumeration value="cache.default_expiration" />
<xs:enumeration value="query.substitutions" />
<xs:enumeration value="query.factory_class" />
<xs:enumeration value="query.linq_provider_class" />
<xs:enumeration value="query.imports" />
<xs:enumeration value="hbm2ddl.auto" />
<xs:enumeration value="hbm2ddl.keywords" />
<xs:enumeration value="sql_exception_converter" />
<xs:enumeration value="adonet.wrap_result_sets" />
<xs:enumeration value="prepare_sql" />
<xs:enumeration value="command_timeout">
<xs:annotation>
<xs:documentation>
Set the default timeout in seconds for ADO.NET queries.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="adonet.batch_size" />
<xs:enumeration value="use_proxy_validator" />
<xs:enumeration value="xml.output_stylesheet" />
<xs:enumeration value="generate_statistics" />
<xs:enumeration value="query.startup_check" />
<xs:enumeration value="default_catalog" />
<xs:enumeration value="proxyfactory.factory_class" />
<xs:enumeration value="adonet.factory_class" />
<xs:enumeration value="default_batch_fetch_size" />
<xs:enumeration value="default_entity_mode" />
<xs:enumeration value="default_flush_mode" />
<xs:enumeration value="use_sql_comments" />
<xs:enumeration value="format_sql" />
<xs:enumeration value="collectiontype.factory_class" />
<xs:enumeration value="order_inserts" />
<xs:enumeration value="order_updates" />
<xs:enumeration value="query.query_model_rewriter_factory" />
<xs:enumeration value="linqtohql.generatorsregistry" />
<xs:enumeration value="odbc.explicit_datetime_scale" />
<xs:enumeration value="adonet.batch_versioned_data" />
<xs:enumeration value="transaction.system_completion_lock_timeout">
<xs:annotation>
<xs:documentation>
Timeout duration in milliseconds for the system transaction completion lock.
When a system transaction completes, it may have its completion events running on concurrent threads,
after scope disposal. This occurs when the transaction is distributed.
This notably concerns ISessionImplementor.AfterTransactionCompletion(bool, ITransaction).
NHibernate protects the session from being concurrently used by the code following the scope disposal
with a lock. To prevent any application freeze, this lock has a default timeout of five seconds. If the
application appears to require longer (!) running transaction completion events, this setting allows to
raise this timeout. -1 disables the timeout.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="transaction.use_connection_on_system_prepare">
<xs:annotation>
<xs:documentation>
When a system transaction is being prepared/prepared, is using connection during this process enabled?
Default is true, for supporting FlushMode.Commit with transaction factories
supporting system transactions. But this requires enlisting additional connections, retaining disposed
sessions and their connections till transaction end, and may trigger undesired transaction promotions to
distributed. Set to false for disabling using connections from system
transaction preparation, while still benefiting from FlushMode.Auto on querying.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="oracle.use_n_prefixed_types_for_unicode">
<xs:annotation>
<xs:documentation>
Oracle has a dual Unicode support model.
Either the whole database use an Unicode encoding, and then all string types
will be Unicode. In such case, Unicode strings should be mapped to non N prefixed
types, such as Varchar2. This is the default.
Or N prefixed types such as NVarchar2 are to be used for Unicode strings.
See https://docs.oracle.com/cd/B19306_01/server.102/b14225/ch6unicode.htm#CACHCAHF
https://docs.oracle.com/database/121/ODPNT/featOraCommand.htm#i1007557
This setting applies only to Oracle dialects and ODP.Net managed or unmanaged driver.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="sql_types.keep_datetime">
<xs:annotation>
<xs:documentation>
Disable switching built-in NHibernate date-time types from DbType.DateTime to DbType.DateTime2
for dialects supporting datetime2.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="query.default_cast_length">
<xs:annotation>
<xs:documentation>
Set the default length used in casting when the target type is length bound and
does not specify it. 4000 by default, automatically trimmed down according to dialect type registration.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="query.default_cast_precision">
<xs:annotation>
<xs:documentation>
Set the default precision used in casting when the target type is decimal and
does not specify it. 29 by default, automatically trimmed down according to dialect type registration.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="query.default_cast_scale">
<xs:annotation>
<xs:documentation>
Set the default scale used in casting when the target type is decimal and
does not specify it. 10 by default, automatically trimmed down according to dialect type registration.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="track_session_id">
<xs:annotation>
<xs:documentation>
Set whether tracking the session id or not. When true, each session will have an unique Guid
that can be retrieved by ISessionImplementor.SessionId, otherwise ISessionImplementor.SessionId will
always be Guid.Empty. Session id is used for logging purpose that can be also retrieved in a static
context by SessionIdLoggingContext.SessionId, where the current session id is stored, when tracking
is enabled. In case the current session id won't be used, it is recommended to disable it, in order
to increase performance.
True by default.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="cache\.[\w._]+"/>
</xs:restriction>
</xs:simpleType>
</xs:union>
</xs:simpleType>
</xs:attribute>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="session-factory">
<xs:complexType>
<xs:sequence>
<xs:element ref="property" minOccurs="0" maxOccurs="unbounded" />
<xs:element ref="mapping" minOccurs="0" maxOccurs="unbounded" />
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="class-cache" />
<xs:element ref="collection-cache" />
</xs:choice>
<xs:element ref="event" minOccurs="0" maxOccurs="unbounded" />
<xs:element ref="listener" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
<xs:attribute name="name" use="optional" />
</xs:complexType>
</xs:element>
<xs:attributeGroup name="cacheSpecification">
<xs:attribute name="region" type="xs:string" use="optional" />
<xs:attribute name="usage" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="read-only" />
<xs:enumeration value="read-write" />
<xs:enumeration value="nonstrict-read-write" />
<xs:enumeration value="transactional" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:attributeGroup>
<xs:element name="event">
<xs:complexType>
<xs:sequence>
<xs:element ref="listener" minOccurs="1" maxOccurs="unbounded" />
</xs:sequence>
<xs:attribute name="type" type="listenerType" use="required" />
</xs:complexType>
</xs:element>
<xs:element name="listener">
<xs:complexType>
<xs:sequence />
<xs:attribute name="class" type="xs:string" use="required" />
<xs:attribute name="type" type="listenerType" use="optional" />
</xs:complexType>
</xs:element>
<xs:simpleType name="listenerType">
<xs:restriction base="xs:string">
<xs:enumeration value="auto-flush" />
<xs:enumeration value="merge" />
<xs:enumeration value="create" />
<xs:enumeration value="create-onflush" />
<xs:enumeration value="delete" />
<xs:enumeration value="dirty-check" />
<xs:enumeration value="evict" />
<xs:enumeration value="flush" />
<xs:enumeration value="flush-entity" />
<xs:enumeration value="load" />
<xs:enumeration value="load-collection" />
<xs:enumeration value="lock" />
<xs:enumeration value="refresh" />
<xs:enumeration value="replicate" />
<xs:enumeration value="save-update" />
<xs:enumeration value="save" />
<xs:enumeration value="pre-update" />
<xs:enumeration value="update" />
<xs:enumeration value="pre-load" />
<xs:enumeration value="pre-delete" />
<xs:enumeration value="pre-insert" />
<xs:enumeration value="post-load" />
<xs:enumeration value="post-insert" />
<xs:enumeration value="post-update" />
<xs:enumeration value="post-delete" />
<xs:enumeration value="post-commit-update" />
<xs:enumeration value="post-commit-insert" />
<xs:enumeration value="post-commit-delete" />
<xs:enumeration value="pre-collection-recreate" />
<xs:enumeration value="pre-collection-remove" />
<xs:enumeration value="pre-collection-update" />
<xs:enumeration value="post-collection-recreate" />
<xs:enumeration value="post-collection-remove" />
<xs:enumeration value="post-collection-update" />
</xs:restriction>
</xs:simpleType>
<xs:element name="bytecode-provider">
<xs:complexType>
<xs:sequence>
</xs:sequence>
<xs:attribute name="type" default="lcg">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="lcg" />
<xs:enumeration value="null" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="reflection-optimizer">
<xs:complexType>
<xs:sequence />
<xs:attribute name="use" type="xs:boolean" />
</xs:complexType>
</xs:element>
</xs:schema>