forked from stuartcarnie/nhibernate-test
-
Notifications
You must be signed in to change notification settings - Fork 19
/
nhibernate-configuration.xsd
483 lines (476 loc) · 22.9 KB
/
nhibernate-configuration.xsd
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
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
<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="objects-factory" minOccurs="0" maxOccurs="1" >
<xs:annotation>
<xs:documentation>
Specify the AssemblyQualifiedName of your custom objects-factory (implementation of IObjectsFactory).
Note: the objects-factory 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:annotation>
<xs:documentation>
The class name of a custom ITransactionFactory implementation.
Defaults to the built-in AdoNetWithSystemTransactionFactory.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<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="cache.use_sliding_expiration">
<xs:annotation>
<xs:documentation>
The use_sliding_expiration value is whether you wish to use a
sliding expiration or not. Defaults
to false. Not all providers support this setting, it may be ignored.
Check their respective
documentation.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<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="query.plan_parameter_metadata_max_size" />
<xs:enumeration value="query.plan_cache_max_size" />
<xs:enumeration value="hbm2ddl.auto" />
<xs:enumeration value="hbm2ddl.keywords" />
<xs:enumeration value="hbm2ddl.throw_on_update">
<xs:annotation>
<!-- 6.0 TODO: should become true -->
<xs:documentation>
Whether to throw or not on schema auto-update failures. false by default.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<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="query.pre_transformer_registrar">
<xs:annotation>
<xs:documentation>
The pre-transformer registrar used to register custom expression transformers.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="linqtohql.generatorsregistry" />
<xs:enumeration value="linqtohql.legacy_preevaluation">
<xs:annotation>
<xs:documentation>
Whether to use the legacy pre-evaluation or not in Linq queries. true by default.
Legacy pre-evaluation is causing special properties or functions like DateTime.Now or Guid.NewGuid()
to be always evaluated with the .Net runtime and replaced in the query by parameter values.
The new pre-evaluation allows them to be converted to HQL function calls which will be run on the db
side. This allows for example to retrieve the server time instead of the client time, or to generate
UUIDs for each row instead of an unique one for all rows.
The new pre-evaluation will likely be enabled by default in the next major version (6.0).
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="linqtohql.fallback_on_preevaluation">
<xs:annotation>
<xs:documentation>
When the new pre-evaluation is enabled, should methods which translation is not supported by the current
dialect fallback to pre-evaluation? false by default.
When this fallback option is enabled while legacy pre-evaluation is disabled, properties or functions
like DateTime.Now or Guid.NewGuid() used in Linq expressions will not fail when the dialect does not
support them, but will instead be pre-evaluated.
When this fallback option is disabled while legacy pre-evaluation is disabled, properties or functions
like DateTime.Now or Guid.NewGuid() used in Linq expressions will fail when the dialect does not
support them.
This option has no effect if the legacy pre-evaluation is enabled.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<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="transaction.auto_join">
<xs:annotation>
<xs:documentation>
Should sessions check on every operation whether there is an ongoing system transaction or not, and enlist
into it if any? Default is true. It can also be controlled at session opening, with
ISessionFactory.WithOptions. A session can also be instructed to explicitly join the current
transaction by calling ISession.JoinTransaction. This setting has no effect when using a
transaction factory that is not system transactions aware.
</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="oracle.use_binary_floating_point_types">
<xs:annotation>
<xs:documentation>
Oracle 10g introduced BINARY_DOUBLE and BINARY_FLOAT types which are compatible with .NET
double and float types, where FLOAT and DOUBLE are not. Oracle FLOAT and DOUBLE types do
not conform to the IEEE standard as they are internally implemented as NUMBER type, which
makes them an exact numeric type.
False by default.
See https://docs.oracle.com/database/121/TTSQL/types.htm#TTSQL126
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="firebird.disable_parameter_casting">
<xs:annotation>
<xs:documentation>
Firebird with FirebirdSql.Data.FirebirdClient may be unable to determine the type
of parameters in many circumstances, unless they are explicitly casted in the SQL
query. To avoid this trouble, the NHibernate FirebirdClientDriver parses SQL
commands for detecting parameters in them and adding an explicit SQL cast around
parameters which may trigger the issue.
For disabling this behavior, set this setting to true.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="sqlite.binaryguid">
<xs:annotation>
<xs:documentation>
SQLite can store GUIDs in binary or text form, controlled by the BinaryGuid
connection string parameter (default is 'true'). The BinaryGuid setting will affect
how to cast GUID to string in SQL. NHibernate will attempt to detect this
setting automatically from the connection string, but if the connection
or connection string is being handled by the application instead of by NHibernate,
you can use the 'sqlite.binaryguid' NHibernate setting to override the behavior.
</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:enumeration value="multi_tenancy.strategy">
<xs:annotation>
<xs:documentation>
Strategy for multi-tenancy. Supported Values: Database, None. Corresponds to MultiTenancyStrategy enum.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="multi_tenancy.connection_provider">
<xs:annotation>
<xs:documentation>
Connection provider for given multi-tenancy strategy. Class name implementing IMultiTenancyConnectionProvider.
</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:union>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="lcg" />
<xs:enumeration value="null" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
<xs:restriction base="xs:string" />
</xs:simpleType>
</xs:union>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="objects-factory">
<xs:complexType>
<xs:sequence />
<xs:attribute name="type" type="xs:string" />
</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>