Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #1817: support key alias #3145

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

xuzhg
Copy link
Member

@xuzhg xuzhg commented Dec 6, 2024

Fixes #1817: support key alias
Introduce the IEdmPropertyRef interface
Use default interface method for IEdmEntityType avoid breaking changes
This change focus on Edm lib, if it's ready and will move to OData.Core.

@xuzhg
Copy link
Member Author

xuzhg commented Dec 6, 2024

I'd like to move the key alias feature forward.
It's not a duplicated of PR: #2411.
It's a different implementation.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 8 out of 23 changed files in this pull request and generated 1 suggestion.

Files not reviewed (15)
  • src/Microsoft.OData.Edm/Microsoft.OData.Edm.csproj: Language not supported
  • src/Microsoft.OData.Edm/Microsoft.OData.Edm.txt: Language not supported
  • src/Microsoft.OData.Edm/PublicAPI/net8.0/PublicAPI.Unshipped.txt: Language not supported
  • src/Microsoft.OData.Edm/Csdl/Serialization/EdmModelCsdlSchemaWriter.cs: Evaluated as low risk
  • src/Microsoft.OData.Edm/Csdl/Parsing/SchemaJsonParser.cs: Evaluated as low risk
  • src/Microsoft.OData.Edm/Csdl/Semantics/BadElements/UnresolvedPropertyRef.cs: Evaluated as low risk
  • src/Microsoft.OData.Edm/Csdl/Serialization/EdmModelCsdlSchemaXmlWriter.cs: Evaluated as low risk
  • src/Microsoft.OData.Edm/Csdl/Serialization/EdmModelCsdlSerializationVisitor.cs: Evaluated as low risk
  • src/Microsoft.OData.Edm/Microsoft.OData.Edm.cs: Evaluated as low risk
  • src/Microsoft.OData.Edm/Csdl/Parsing/CsdlDocumentParser.cs: Evaluated as low risk
  • src/Microsoft.OData.Edm/Validation/EdmErrorCode.cs: Evaluated as low risk
  • src/Microsoft.OData.Edm/Csdl/Parsing/Ast/CsdlPropertyReference.cs: Evaluated as low risk
  • src/Microsoft.OData.Edm/Parameterized.Microsoft.OData.Edm.cs: Evaluated as low risk
  • src/Microsoft.OData.Edm/Schema/Interfaces/IEdmEntityType.cs: Evaluated as low risk
  • src/Microsoft.OData.Edm/Schema/EdmEntityType.cs: Evaluated as low risk
Comments skipped due to low confidence (1)

src/Microsoft.OData.Edm/Schema/Interfaces/IEdmPropertyRef.cs:29

  • [nitpick] The description for PropertyAlias could be more detailed to explain its purpose and usage.
string PropertyAlias { get; }

}

IEdmProperty edmProperty = FindPropertyOnType(edmStructuredType, segment);
if (i == segment.Length - 1)
Copy link
Preview

Copilot AI Dec 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The condition should be 'if (i == segments.Length - 1)' to correctly identify the last segment in the path.

Suggested change
if (i == segment.Length - 1)
if (i == segments.Length - 1)

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
Introduce the IEdmPropertyRef interface
Use default interface method for IEdmEntityType avoid breaking changes
This change focus on Edm lib, if it's ready and will move to OData.Core.
@xuzhg xuzhg force-pushed the issue1817_SupportKeyAlias branch from 943889a to 8540bc5 Compare December 6, 2024 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support OData key alias
1 participant