You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was attempting to convert a very large CSDL, I ran validation on the parsed document and found an odd issue. It took me a bit to realize that the word 'Fred' had nothing to do with my code or the document I was parsing but has likely been a bug in the code base for about 10 years if the git blame is to be believed.
I attempted to make the fix myself but I don't have the time. It was painful getting a successful build, and I am not familiar enough with the OData spec to say what should be used instead of 'Fred'.
Here is an example set of error messages:
> 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 'contentfileref' on entity 'Microsoft.Dynamics.CRM.webresource' does not match the type of property 'fileattachmentid' on entity 'fileattachment' in the referential constraint 'Fred'.
> Because all dependent properties of the navigation 'ContentFileRef' are nullable, the multiplicity of the principal end must be '0..1'.
> 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 'contentjsonfileref' on entity 'Microsoft.Dynamics.CRM.webresource' does not match the type of property 'fileattachmentid' on entity 'fileattachment' in the referential constraint 'Fred'.
I don't know if this is helpful but this is one of the documents I am working with, it should help with test cases but be warned validating this document takes 7 minutes on my PC. $metadata.xml
The text was updated successfully, but these errors were encountered:
This has been resolved by removing 'Fred' as parameter.
For your case, ensures that the data type of property 'contentfileref' on entity 'Microsoft.Dynamics.CRM.webresource' matches the data type of property 'fileattachmentid' on entity 'fileattachment'. To elaborate, if one property is of type INT, ensure that the other is also of the same type, INT, and so forth.
Description
I was attempting to convert a very large CSDL, I ran validation on the parsed document and found an odd issue. It took me a bit to realize that the word 'Fred' had nothing to do with my code or the document I was parsing but has likely been a bug in the code base for about 10 years if the git blame is to be believed.
I attempted to make the fix myself but I don't have the time. It was painful getting a successful build, and I am not familiar enough with the OData spec to say what should be used instead of 'Fred'.
Here is an example set of error messages:
Code Reference
https://github.com/OData/odata.net/blame/57572612f1ff833d395b44e6b2c498d7d0d31890/src/Microsoft.OData.Edm/Validation/ValidationRules.cs#L1614
Non-Annotated CSDL
I don't know if this is helpful but this is one of the documents I am working with, it should help with test cases but be warned validating this document takes 7 minutes on my PC.
$metadata.xml
The text was updated successfully, but these errors were encountered: