To address the issue of the hardcoded 'Fred' argument in the EdmModel_Validator_Semantic_TypeMismatchRelationshipConstraint error message, this PR modify the error message template by removing the fourth parameter. This will prevent the display of the hardcoded value and ensure that the error message only contains relevant dynamic content.
Original error message template with 'Fred':
_
The types of all properties in the dependent role of a referential constraint must be the same as the corresponding property types in the principal role. The type of property '{0}' on entity '{1}' does not match the type of property '{2}' on entity '{3}' in the referential constraint '{4}'.
_
Updated error message template without the hardcoded 'Fred':
The types of all properties in the dependent role of a referential constraint must be the same as the corresponding property types in the principal role. The type of property '{0}' on entity '{1}' does not match the type of property '{2}' on entity '{3}' in the referential constraint.
Main Changes:
Removed 4th parameter of _EdmModel_Validator_Semantic_TypeMismatchRelationshipConstraint in Microsoft.OData.Edm.txt_. Running Parameterized.Microsoft.OData.Edm.tt will generate EdmModel_Validator_Semantic_TypeMismatchRelationshipConstraint method with 3 parameters.
Modified NavigationPropertyTypeMismatchRelationshipConstraint method in ValidationRules.cs to remove 'Fred' passed as 4th argument in Strings.EdmModel_Validator_Semantic_TypeMismatchRelationshipConstraint.
Modified NavigationPropertyTypeMismatchOnReferentialConstraint test case to remove 'Fred' passed as 4th argument in Strings.EdmModel_Validator_Semantic_TypeMismatchRelationshipConstraint.
Checklist (Uncheck if it is not completed)
[ ] Test cases added
[x] Test case modified
[x] Build and test with one-click build and test script passed
Issues
Description
To address the issue of the hardcoded 'Fred' argument in the
EdmModel_Validator_Semantic_TypeMismatchRelationshipConstraint
error message, this PR modify the error message template by removing the fourth parameter. This will prevent the display of the hardcoded value and ensure that the error message only contains relevant dynamic content.Original error message template with 'Fred': _
_
Updated error message template without the hardcoded 'Fred':
Main Changes:
EdmModel_Validator_Semantic_TypeMismatchRelationshipConstraint
inMicrosoft.OData.Edm.txt
_. RunningParameterized.Microsoft.OData.Edm.tt
will generateEdmModel_Validator_Semantic_TypeMismatchRelationshipConstraint
method with 3 parameters.NavigationPropertyTypeMismatchRelationshipConstraint
method inValidationRules.cs
to remove 'Fred' passed as 4th argument inStrings.EdmModel_Validator_Semantic_TypeMismatchRelationshipConstraint
.NavigationPropertyTypeMismatchOnReferentialConstraint
test case to remove 'Fred' passed as 4th argument inStrings.EdmModel_Validator_Semantic_TypeMismatchRelationshipConstraint
.Checklist (Uncheck if it is not completed)