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

Map directly to JSON id for types converted to string #34564

Merged
merged 2 commits into from
Aug 30, 2024

Conversation

ajcvickers
Copy link
Contributor

Fixes #34554

I also needed to fix #34511 to make this work. This was happening because we were removing the by-convention property added by property discovery. We only need to remove it when it's the computed property as well, which is handled by the other case.

@ajcvickers ajcvickers requested a review from a team August 29, 2024 09:53
@ajcvickers
Copy link
Contributor Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

{
jsonIdProperty.Builder.ToJsonProperty(null);
entityType.Builder.HasNoProperty(jsonIdProperty);
Copy link
Member

Choose a reason for hiding this comment

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

entityType.Builder.RemoveUnusedImplicitProperties([jsonIdProperty]);

}

if (computedIdProperty != null
if (computedIdProperty is not null
&& computedIdProperty != jsonIdProperty)
{
entityType.Builder.HasNoProperty(computedIdProperty);
Copy link
Member

Choose a reason for hiding this comment

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

entityType.Builder.RemoveUnusedImplicitProperties([computedIdProperty]);

Fixes #34554

I also needed to fix #34511 to make this work. This was happening because we were removing the by-convention property added by property discovery. We only need to remove it when it's the computed property as well, which is handled by the other case.
@ajcvickers ajcvickers force-pushed the ThePerfectStringAlong branch from f79c7d7 to cb1d795 Compare August 30, 2024 07:37
@ajcvickers ajcvickers force-pushed the ThePerfectStringAlong branch from cb1d795 to 662b616 Compare August 30, 2024 08:07
@ajcvickers ajcvickers merged commit f0965d6 into main Aug 30, 2024
7 checks passed
@ajcvickers ajcvickers deleted the ThePerfectStringAlong branch August 30, 2024 13:14
ajcvickers added a commit that referenced this pull request Aug 30, 2024
* Map directly to JSON id for types converted to string

Fixes #34554

I also needed to fix #34511 to make this work. This was happening because we were removing the by-convention property added by property discovery. We only need to remove it when it's the computed property as well, which is handled by the other case.

* Updates
roji pushed a commit that referenced this pull request Aug 31, 2024
Fixes #34554

I also needed to fix #34511 to make this work. This was happening because we were removing the by-convention property added by property discovery. We only need to remove it when it's the computed property as well, which is handled by the other case.
@roji roji modified the milestone: 9.0.0-rc2 Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants