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

add guidance for transitioning from a structural collection to a navigation collection #551

Open
wants to merge 21 commits into
base: vNext
Choose a base branch
from

Conversation

corranrogue9
Copy link
Contributor

No description provided.

@corranrogue9 corranrogue9 requested a review from a team as a code owner July 5, 2024 17:14
</Key>
<Property Name="id" Type="Edm.String" Nullable="false" />
<Property Name="bars" Type="Collection(self.bar)" />
+ <NavigationProperty Name="barsAsEntities" Type="Collection(self.barAsEntity)" ContainsTarget="true" />
Copy link
Contributor

Choose a reason for hiding this comment

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

We wouldn't really want them to name barsAsEntities, would we? I feel like Entities isn't a concept the api consumer necessarily needs to understand.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm open to other naming conventions, but I do think a naming convention needs to be established for this. If we take your other suggestions and drive workloads to deprecate the old property, then this new property is temporary and can be moved to use the old name if desired. I don't personally have an issue with this name because a client that is wanting to update this collection at least needs to know enough about OData to understand that this is the property that they need to use (instead of the old property). I'm normally opposed to hungarian notation, but in this instance, the difference between the two properties is literally the type, and so the naming needs to reflect that.

```
The expectation is that `bars` and `barsAsEntities` are treated as two "views" into the same data.
To meet this expectation, workloads must:
1. Keep the properties consistent between `bar` and `barAsEntity`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we really want to keep maintaining bar, or would it be better to deprecate bar and only add new properties to barAsEntity?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

At the very least, this section needs to be honored by workloads for the period that both properties exist. I think we are agreed on that?

I personally don't feel strongly about driving workloads to deprecate the old property. I think that their own supportability overhead will be a forcing function for them, and if they don't have significant overhead, I don't see a problem with having both properties.

Maybe I should just add a sentence that says that the old property should be marked deprecated (and leave out whether it ever gets removed)?

<PropertyRef Name="id" />
</Key>
<Property Name="id" Type="Edm.String" Nullable="false" />
<Property Name="bars" Type="Collection(self.bar)" />
Copy link
Contributor

Choose a reason for hiding this comment

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

In this case, I would suggest deprecating bars in favor of barsAsEntities.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the other comment has more context, but I'll leave this open for now pending that outcome.

@OlgaPodo OlgaPodo added Graph Guidelines This should be reviewed by Microsoft Grap team. Microsoft Graph This should be reviewed by Microsoft Grap team. labels Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Graph Guidelines This should be reviewed by Microsoft Grap team. Microsoft Graph This should be reviewed by Microsoft Grap team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants