Schema what-changed almost complete.

Perhaps the biggest and most complex of all the models to determine what has changed.
This commit is contained in:
Dave Shanley
2022-10-10 12:19:57 -04:00
parent b83e751aa7
commit 61beb3ea2a
7 changed files with 805 additions and 44 deletions

View File

@@ -37,8 +37,10 @@ func (d *Discriminator) FindMappingValue(key string) *low.ValueReference[string]
func (d *Discriminator) Hash() [32]byte {
// calculate a hash from every property.
f := []string{d.PropertyName.Value}
var f []string
if d.PropertyName.Value != "" {
f = append(f, d.PropertyName.Value)
}
propertyKeys := make([]string, 0, len(d.Mapping))
for i := range d.Mapping {
propertyKeys = append(propertyKeys, i.Value)