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

Addressing API review feedback regarding json columns #28685

Merged
merged 1 commit into from
Aug 12, 2022
Merged

Conversation

maumar
Copy link
Contributor

@maumar maumar commented Aug 11, 2022

  • renamed JsonColumnName to ContainerColumnName,
  • renamed JsonColumnTypeMapping to ContainerColumnTypeMapping,
  • changed RelationalModelValidator.ValidateJsonEntityProperties to protected method,
  • moved JsonPropertyName methods on navigation into entity

@maumar maumar requested review from a team and AndriySvyryd August 11, 2022 23:50
@@ -42,7 +42,7 @@ public class RelationalNavigationJsonPropertyNameAttributeConvention :
{
if (!string.IsNullOrWhiteSpace(attribute.Name))
{
navigationBuilder.HasJsonPropertyName(attribute.Name, fromDataAnnotation: true);
navigationBuilder.Metadata.TargetEntityType.Builder.HasJsonPropertyName(attribute.Name, fromDataAnnotation: true);
Copy link
Member

Choose a reason for hiding this comment

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

So the attribute is the only way of setting the JsonPropertyName right now? Can you file an issue to make ToJson set it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you can use builder APIs also:
OwnedNavigationBuilder HasJsonPropertyName
and
PropertyBuilder HasJsonPropertyName

- renamed JsonColumnName to ContainerColumnName,
- renamed JsonColumnTypeMapping to ContainerColumnTypeMapping,
- changed RelationalModelValidator.ValidateJsonEntityProperties to protected method,
- moved JsonPropertyName methods on navigation into entity
@maumar maumar merged commit 1c7ef8c into main Aug 12, 2022
@maumar maumar deleted the json_api_review branch August 12, 2022 21:53
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.

2 participants