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

odata-cli generated entity with "Context" property will not compile #297

Closed
benbward opened this issue Jun 8, 2022 · 0 comments · Fixed by #333
Closed

odata-cli generated entity with "Context" property will not compile #297

benbward opened this issue Jun 8, 2022 · 0 comments · Fixed by #333

Comments

@benbward
Copy link

benbward commented Jun 8, 2022

Describe the bug

When the entity includes a property named, "Context", a conflict arises with the Microsoft.OData.Client.BaseEntityType.Context object of the same name.

Version of the Project affected

Microsoft.OData.Cli v0.1.0
VisualStudio Version v17.2.3
Microsoft.Odata.Client v7.11.0

To Reproduce

Steps to reproduce the behavior:

  1. Define an OData api with an entity having a "Context" property. (<Property Name="Context" Type="Edm.String">)
  2. Use the OData CLI to generate classes.
  3. Build the project.
  4. Observe errors including 'string' does not contain a definition for 'EntityTracker'
  5. Observe a warning 'EssWorkflowWorkItem.Context' hides inherited member 'BaseEntityType.Context'.

Expected behavior

No compilation errors should occur.

Actual behavior

Compilation errors occur.

Screenshots

Additional context

We are working around this by removing the generated (and unused) method where the error occurs.

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 a pull request may close this issue.

1 participant