diff --git a/src/JsonApiDotNetCore/Models/Annotation/HasManyAttribute.cs b/src/JsonApiDotNetCore/Models/Annotation/HasManyAttribute.cs index 7a05dd8fe4..8a2c5fc724 100644 --- a/src/JsonApiDotNetCore/Models/Annotation/HasManyAttribute.cs +++ b/src/JsonApiDotNetCore/Models/Annotation/HasManyAttribute.cs @@ -12,7 +12,6 @@ public class HasManyAttribute : RelationshipAttribute /// The relationship name as exposed by the API /// Which links are available. Defaults to /// Whether or not this relationship can be included using the ?include=public-name query string - /// The name of the entity mapped property, defaults to null /// /// /// @@ -25,8 +24,8 @@ public class HasManyAttribute : RelationshipAttribute /// /// /// - public HasManyAttribute(string publicName = null, Link relationshipLinks = Link.All, bool canInclude = true, string mappedBy = null, string inverseNavigationProperty = null) - : base(publicName, relationshipLinks, canInclude, mappedBy) + public HasManyAttribute(string publicName = null, Link relationshipLinks = Link.All, bool canInclude = true, string inverseNavigationProperty = null) + : base(publicName, relationshipLinks, canInclude) { InverseNavigation = inverseNavigationProperty; } diff --git a/src/JsonApiDotNetCore/Models/Annotation/HasOneAttribute.cs b/src/JsonApiDotNetCore/Models/Annotation/HasOneAttribute.cs index 772eb32457..dd4c483165 100644 --- a/src/JsonApiDotNetCore/Models/Annotation/HasOneAttribute.cs +++ b/src/JsonApiDotNetCore/Models/Annotation/HasOneAttribute.cs @@ -14,7 +14,6 @@ public class HasOneAttribute : RelationshipAttribute /// or is used. /// Whether or not this relationship can be included using the ?include=public-name query string /// The foreign key property name. Defaults to "{RelationshipName}Id" - /// The name of the entity mapped property, defaults to null /// /// /// Using an alternative foreign key: @@ -28,9 +27,8 @@ public class HasOneAttribute : RelationshipAttribute /// } /// /// - public HasOneAttribute(string publicName = null, Link links = Link.NotConfigured, bool canInclude = true, string withForeignKey = null, string mappedBy = null, string inverseNavigationProperty = null) - - : base(publicName, links, canInclude, mappedBy) + public HasOneAttribute(string publicName = null, Link links = Link.NotConfigured, bool canInclude = true, string withForeignKey = null, string inverseNavigationProperty = null) + : base(publicName, links, canInclude) { _explicitIdentifiablePropertyName = withForeignKey; InverseNavigation = inverseNavigationProperty; diff --git a/src/JsonApiDotNetCore/Models/Annotation/RelationshipAttribute.cs b/src/JsonApiDotNetCore/Models/Annotation/RelationshipAttribute.cs index 4eb8d2bbfc..44a67396e0 100644 --- a/src/JsonApiDotNetCore/Models/Annotation/RelationshipAttribute.cs +++ b/src/JsonApiDotNetCore/Models/Annotation/RelationshipAttribute.cs @@ -7,7 +7,7 @@ namespace JsonApiDotNetCore.Models { public abstract class RelationshipAttribute : Attribute, IResourceField { - protected RelationshipAttribute(string publicName, Link relationshipLinks, bool canInclude, string mappedBy) + protected RelationshipAttribute(string publicName, Link relationshipLinks, bool canInclude) { if (relationshipLinks == Link.Paging) throw new JsonApiSetupException($"{Link.Paging.ToString("g")} not allowed for argument {nameof(relationshipLinks)}"); @@ -15,7 +15,6 @@ protected RelationshipAttribute(string publicName, Link relationshipLinks, bool PublicRelationshipName = publicName; RelationshipLinks = relationshipLinks; CanInclude = canInclude; - EntityPropertyName = mappedBy; } public string ExposedInternalMemberName => InternalRelationshipName; @@ -49,7 +48,6 @@ protected RelationshipAttribute(string publicName, Link relationshipLinks, bool /// public Link RelationshipLinks { get; } public bool CanInclude { get; } - public string EntityPropertyName { get; } public abstract void SetValue(object entity, object newValue);