You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/reference/modules/nhibernate_mapping_attributes.xml
+14-11Lines changed: 14 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@
17
17
<orderedlist>
18
18
<listitem>
19
19
<para>
20
-
<emphasisrole="strong">NHibernate.Mapping.Attributes</emphasis>: That is the only assembly you need (as end-user).</para>
20
+
<emphasisrole="strong">NHibernate.Mapping.Attributes</emphasis>: that is the only assembly you need (as an end-user).</para>
21
21
</listitem>
22
22
<listitem>
23
23
<para>
@@ -32,7 +32,7 @@
32
32
<para>
33
33
<ulinkurl="http://mbunit.tigris.org/">
34
34
<emphasisrole="strong">Refly</emphasis>
35
-
</ulink>: thanks to <ulinkurl="http://www.dotnetwiki.org/">Jonathan de Halleux</ulink> for this library which make it so easy to generate code.</para>
35
+
</ulink>: thanks to <ulinkurl="http://www.dotnetwiki.org/">Jonathan de Halleux</ulink> for this library which makes it so easy to generate code.</para>
36
36
</listitem>
37
37
</orderedlist>
38
38
</para>
@@ -78,15 +78,17 @@ public class MappedSubClass : Base { }</programlisting>
78
78
<para>
79
79
It is possible to register patterns (using Regular Expressions) to automatically transform fully qualified names of properties types
80
80
into something else. Eg: <literal>HbmSerializer.Default.HbmWriter.Patterns.Add(@"Namespace\.(\S+), Assembly", "$1");</literal> will
81
-
map all properties with a not-qualified type name.</para>
81
+
map all properties with a not-qualified type name.
82
+
</para>
82
83
</listitem>
83
84
<listitem>
84
85
<para>
85
86
Two methods have been added to the <literal>HbmSerializer</literal> class, allowing generating mappings from a type or an assembly:
86
87
<literal>HbmSerializer.Default.Serialize(typeof(XXX))</literal> and
87
88
<literal>HbmSerializer.Default.Serialize(typeof(XXX).Assembly)</literal>. So it is no longer required to create a MemoryStream for
88
89
these simple cases. The output of these call can be directly added to your NHibernate <literal>Configuration</literal> instance:
<para>Two <methodname>WriteUserDefinedContent()</methodname> methods have been added to <classname>HbmWriter</classname>. They improve the extensibility of this library; it is now very easy to create a .NET attribute and integrate it in the mapping.</para>
@@ -99,13 +101,14 @@ public class MappedSubClass : Base { }</programlisting>
99
101
</listitem>
100
102
<listitem>
101
103
<para>
102
-
A notable "bug" fix is the re-ordering of (joined-)subclasses; This operation may be required when a subclass extends another subclass.
104
+
A notable "bug" fix is the re-ordering of (joined-)subclasses. This operation may be required when a subclass extends another subclass.
103
105
In this case, the extended class mapping must come before the extending class mapping. Note that the re-ordering takes place only for
104
106
"top-level" classes (that is not nested in other mapped classes). Anyway, it is quite unusual to put an interdependent mapped subclasses
105
-
in a mapped class.</para>
107
+
in a mapped class.
108
+
</para>
106
109
</listitem>
107
110
<listitem>
108
-
<para>There are also many other little changes; refer to the release notes for more details.</para>
111
+
<para>There are also many other little changes: refer to the release notes for more details.</para>
Use <methodname>HbmSerializer.Validate</methodname> to enable/disable the validation of generated xml streams (against
168
171
NHibernate mapping schema). This is useful to quickly find errors. (They are written in the StringBuilder property
169
-
<methodname>HbmSerializer.Error</methodname>.) If the error is due to this library, then see if it is a know issue and report it.
170
-
You are welcome to contribute a solution if you solve the problem :).</para>
172
+
<methodname>HbmSerializer.Error</methodname>.) If the error is due to this library, then see if it is a known issue and report it.
173
+
You are welcome to contribute a solution if you solve the trouble :).</para>
171
174
</listitem>
172
175
<listitem>
173
176
<para>Your classes, fields and properties (members) can be private; just make sure that you have the permission to access private members using reflection (<methodname>ReflectionPermissionFlag.MemberAccess</methodname>).</para>
@@ -262,7 +265,7 @@ public MyType MyProperty;</programlisting>
262
265
<para>Anyway, the solution would be to add a <methodname>int ParentNode</methodname> property to BaseAttribute so that you can create a real graph...</para>
263
266
<para>For now, you can fallback on <classname>[RawXml]</classname>.</para>
264
267
265
-
<para>Actually, there is no other know issue nor planned modification. This library should be stable and complete; but if you find a bug or think of an useful improvement, contact us!</para>
268
+
<para>Actually, there is no other know issue nor planned modification. This library should be stable and complete. But if you find a bug or think of an useful improvement, contact us!</para>
266
269
<para>As a side note, it would be nice to write a better TestFixture than <emphasis>NHibernate.Mapping.Attributes.Test</emphasis> :D.</para>
267
270
</section>
268
271
@@ -292,7 +295,7 @@ public MyType MyProperty;</programlisting>
292
295
</para>
293
296
</listitem>
294
297
</orderedlist>
295
-
<para>This implementation is based on NHibernate mapping schema; so there is probably lot of "standard schema features" that are not supported...</para>
298
+
<para>This implementation is based on NHibernate mapping schema. So there is probably lot of "standard schema features" that are not supported...</para>
296
299
<para>The version of NHibernate.Mapping.Attributes should be the version of the NHibernate schema used to generate it (=> the version of NHibernate library).</para>
297
300
<para>
298
301
In the design of this project, performance is a (<emphasis>very</emphasis>) minor goal :). Easier implementation and maintenance
0 commit comments