CompositeUserTypes CANNOT Short-circuit NullSafeSet
jbtule opened this issue · comments
Because this implementation is cited as an example across the internet. I feel it's important to point out a data corrupting bug in this generic implementation.
NullSafeSet
needs to get called on each composite property with null when value
is null.
If you don't and you have a batch save of objects with said composite type, any null value property will get be updated in the DB with the last nonnull value saved
ncommon/NCommon.NHibernate/src/CompositeUserTypeBase.cs
Lines 149 to 162 in 597f4ef