Description
Environment
Activity
Frédéric Delaporte October 5, 2017 at 11:46 AM
Your are welcome to contribute. Please make sure you follow guidelines from contributing.md file. You already have the Jira, which is great.
About tests, there are already some tests about those properties, like WhenSetUpdateThenSetAttributes
in NHibernate.Test.MappingByCode.MappersTests.PropertyMapperTest
. So it seems some tests are missing, and need to be added.
About the classes, they are generated code. Avoid editing them manually. Instead follow How to generate Hbm.generated.cs.txt.
It should be noted that the actual feature provided by those update
and insert
attribute still works as expected even when they are not set, treating them as if they were true
, because the feature checks if they were explicitly defined, and if no, disregards their actual value and considers them true
.
Now for correctness it would still be better to have their default value correctly set in the xsd schema.
As per the documentation, the class
<property>
insert
andupdate
attributes are optional and their default value istrue
.But when we deserialize .hbm file to
HbmClass
whose property is not set (that means it should betrue
by default) it showsfalse
value with theHbmProperty
'sinsert
andupdate
. This contradicts the documentation. Actually it should have beentrue
.Here is the actual places where changes needs to be done.
As we know where to fix, so moderator will agree we can submit the solution.