[DAR-3920][External] Bug fix for importing property values to identically named properties during property creation #930
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
This PR address an issue that occurs when creating two identically named properties on separate classes and then importing values of those properties in the same import action. In this scenario, we get this type of error:
However: The import does successfully create the properties & their values. Additionally, a 2nd import will import the annotations without error
The problem is that the
annotation_property_map
returned from_import_properties
is constructed incorrectly in this scenario. Specifically, we only used to check that the name of a property matched the name of the property to be imported. If importing annotations containing multiple identically named properties, this logic allows for mis-matchingSolution
In addition to checking that the property names match, check that the annotation classes match too
Changelog
Fixed an edge case when importing property values during property creation