]]>
In this case, when writing:
[Attributes.P(0)]
- [Attributes.C(1)]
- [Attributes.X(2)]
- [Attributes.X(3)]
+[Attributes.C(1)]
+ [Attributes.X(2)]
+[Attributes.X(3)]
public MyType MyProperty;
X(3) will always belong to C(1) ! (as X(2)).
@@ -233,7 +263,7 @@ public MyType MyProperty;
For now, you can fallback on [RawXml].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!
- On side note, it would be nice to write a better TestFixture than NHibernate.Mapping.Attributes.Test :D
+ As a side note, it would be nice to write a better TestFixture than NHibernate.Mapping.Attributes.Test :D.
@@ -242,19 +272,33 @@ public MyType MyProperty;
Any change to the schema (nhibernate-mapping.xsd) implies:
- Checking if there is any change to do in the Generator (like updating KnowEnums / AllowMultipleValue / IsRoot / IsSystemType / IsSystemEnum / CanContainItself)
+
+ Checking if there is any change to do in the Generator (like updating KnowEnums /
+ AllowMultipleValue / IsRoot / IsSystemType /
+ IsSystemEnum / CanContainItself).
+
- Updating /src/NHibernate.Mapping.Attributes/nhibernate-mapping.xsd (copy/paste) and running the Generator again (even if it wasn't modified)
+
+ Updating /src/NHibernate.Mapping.Attributes/nhibernate-mapping.xsd (copy/paste)
+ and running the Generator again (even if it wasn't modified).
+
- Running the Test project and make sure that no exception is thrown. A class/property should be modified/added in this project to be sure that any new breaking change will be caught (=> update the reference hbm.xml files and/or the project NHibernate.Mapping.Attributes.csproj)
+
+ Running the Test project and make sure that no exception is thrown. A class/property should be modified/added
+ in this project to be sure that any new breaking change will be caught (=> update the reference hbm.xml files
+ and/or the project NHibernate.Mapping.Attributes.csproj).
+ This implementation is based on NHibernate mapping schema; so there is probably lot of "standard schema features" that are not supported...The version of NHibernate.Mapping.Attributes should be the version of the NHibernate schema used to generate it (=> the version of NHibernate library).
- In the design of this project, performance is a (very) minor goal :) Easier implementation and maintenance are far more important because you can (and should) avoid to use this library in production (Cf. the first tip in ).
+
+ In the design of this project, performance is a (very) minor goal :). Easier implementation and maintenance
+ are far more important because you can use this library to generate statically the mapping files and use them instead in production.
+ (Cf. the first tip in .)
+
-
diff --git a/doc/reference/modules/quickstart.xml b/doc/reference/modules/quickstart.xml
index 1185ae2cdfa..da6d4e6c877 100644
--- a/doc/reference/modules/quickstart.xml
+++ b/doc/reference/modules/quickstart.xml
@@ -154,6 +154,10 @@
Mapping the cat
+
+ This tutorial directly uses xml mapping files. This is just one among many mapping solution
+ NHibernate provides, see .
+
The Cat.hbm.xml mapping file contains the metadata
required for the object/relational mapping. The metadata includes declaration
From cd8e695aa8860bf8d9afe8b578f8c91355d99233 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Delaporte?=
<12201973+fredericdelaporte@users.noreply.github.com>
Date: Fri, 17 Jul 2020 12:18:42 +0200
Subject: [PATCH 2/2] Fix some more typo
---
doc/reference/modules/basic_mapping.xml | 2 +-
.../modules/nhibernate_mapping_attributes.xml | 25 +++++++++++--------
doc/reference/modules/quickstart.xml | 2 +-
3 files changed, 16 insertions(+), 13 deletions(-)
diff --git a/doc/reference/modules/basic_mapping.xml b/doc/reference/modules/basic_mapping.xml
index 950dae5de74..30166e03d4a 100644
--- a/doc/reference/modules/basic_mapping.xml
+++ b/doc/reference/modules/basic_mapping.xml
@@ -15,7 +15,7 @@
Note that, even though many NHibernate users choose to define XML mappings by hand,
a number of tools exist to generate the mapping document, even transparently at runtime.
This includes the NHibernate.Mapping.Attributes
- library which allows to directly annotate your entities with mapping declaration,
+ library which allows to directly annotate your entities with mapping declarations,
various template-based code generators (CodeSmith, MyGeneration), the built-in
NHibernate.Mapping.ByCode API available since NHibernate 3.2, or
the Fluent NHibernate
diff --git a/doc/reference/modules/nhibernate_mapping_attributes.xml b/doc/reference/modules/nhibernate_mapping_attributes.xml
index 042ca1e7084..cdb4c7c8764 100644
--- a/doc/reference/modules/nhibernate_mapping_attributes.xml
+++ b/doc/reference/modules/nhibernate_mapping_attributes.xml
@@ -17,7 +17,7 @@
- NHibernate.Mapping.Attributes: That is the only assembly you need (as end-user).
+ NHibernate.Mapping.Attributes: that is the only assembly you need (as an end-user).
@@ -32,7 +32,7 @@
Refly
- : thanks to Jonathan de Halleux for this library which make it so easy to generate code.
+ : thanks to Jonathan de Halleux for this library which makes it so easy to generate code.
@@ -78,7 +78,8 @@ public class MappedSubClass : Base { }
It is possible to register patterns (using Regular Expressions) to automatically transform fully qualified names of properties types
into something else. Eg: HbmSerializer.Default.HbmWriter.Patterns.Add(@"Namespace\.(\S+), Assembly", "$1"); will
- map all properties with a not-qualified type name.
+ map all properties with a not-qualified type name.
+
@@ -86,7 +87,8 @@ public class MappedSubClass : Base { }
HbmSerializer.Default.Serialize(typeof(XXX)) and
HbmSerializer.Default.Serialize(typeof(XXX).Assembly). So it is no longer required to create a MemoryStream for
these simple cases. The output of these call can be directly added to your NHibernate Configuration instance:
- cfg.AddInputStream(HbmSerializer.Default.Serialize(typeof(XXX))).
+ cfg.AddInputStream(HbmSerializer.Default.Serialize(typeof(XXX))).
+
Two WriteUserDefinedContent() methods have been added to HbmWriter. They improve the extensibility of this library; it is now very easy to create a .NET attribute and integrate it in the mapping.
@@ -99,13 +101,14 @@ public class MappedSubClass : Base { }
- A notable "bug" fix is the re-ordering of (joined-)subclasses; This operation may be required when a subclass extends another subclass.
+ A notable "bug" fix is the re-ordering of (joined-)subclasses. This operation may be required when a subclass extends another subclass.
In this case, the extended class mapping must come before the extending class mapping. Note that the re-ordering takes place only for
"top-level" classes (that is not nested in other mapped classes). Anyway, it is quite unusual to put an interdependent mapped subclasses
- in a mapped class.
+ in a mapped class.
+
- There are also many other little changes; refer to the release notes for more details.
+ There are also many other little changes: refer to the release notes for more details.
@@ -166,8 +169,8 @@ cfg.AddInputStream(HbmSerializer.Default.Serialize(
Use HbmSerializer.Validate to enable/disable the validation of generated xml streams (against
NHibernate mapping schema). This is useful to quickly find errors. (They are written in the StringBuilder property
- HbmSerializer.Error.) If the error is due to this library, then see if it is a know issue and report it.
- You are welcome to contribute a solution if you solve the problem :).
+ HbmSerializer.Error.) If the error is due to this library, then see if it is a known issue and report it.
+ You are welcome to contribute a solution if you solve the trouble :).
Your classes, fields and properties (members) can be private; just make sure that you have the permission to access private members using reflection (ReflectionPermissionFlag.MemberAccess).
@@ -262,7 +265,7 @@ public MyType MyProperty;
Anyway, the solution would be to add a int ParentNode property to BaseAttribute so that you can create a real graph...For now, you can fallback on [RawXml].
- 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!
+ 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!As a side note, it would be nice to write a better TestFixture than NHibernate.Mapping.Attributes.Test :D.
@@ -292,7 +295,7 @@ public MyType MyProperty;
- This implementation is based on NHibernate mapping schema; so there is probably lot of "standard schema features" that are not supported...
+ This implementation is based on NHibernate mapping schema. So there is probably lot of "standard schema features" that are not supported...The version of NHibernate.Mapping.Attributes should be the version of the NHibernate schema used to generate it (=> the version of NHibernate library).
In the design of this project, performance is a (very) minor goal :). Easier implementation and maintenance
diff --git a/doc/reference/modules/quickstart.xml b/doc/reference/modules/quickstart.xml
index da6d4e6c877..f949f5c422e 100644
--- a/doc/reference/modules/quickstart.xml
+++ b/doc/reference/modules/quickstart.xml
@@ -155,7 +155,7 @@
Mapping the cat
- This tutorial directly uses xml mapping files. This is just one among many mapping solution
+ This tutorial directly uses xml mapping files. This is just one among many mapping solutions
NHibernate provides, see .