11using System ;
22using System . Reflection ;
3+ using System . Security ;
34
45namespace JsonApiDotNetCore . Models
56{
@@ -30,14 +31,15 @@ public class HasManyThroughAttribute : HasManyAttribute
3031 /// <param name="internalThroughName">The name of the navigation property that will be used to get the HasMany relationship</param>
3132 /// <param name="documentLinks">Which links are available. Defaults to <see cref="Link.All"/></param>
3233 /// <param name="canInclude">Whether or not this relationship can be included using the <c>?include=public-name</c> query string</param>
34+ /// <param name="mappedBy">The name of the entity mapped property, defaults to null</param>
3335 ///
3436 /// <example>
3537 /// <code>
3638 /// [HasManyThrough(nameof(ArticleTags), documentLinks: Link.All, canInclude: true)]
3739 /// </code>
3840 /// </example>
39- public HasManyThroughAttribute ( string internalThroughName , Link documentLinks = Link . All , bool canInclude = true )
40- : base ( null , documentLinks , canInclude )
41+ public HasManyThroughAttribute ( string internalThroughName , Link documentLinks = Link . All , bool canInclude = true , string mappedBy = null )
42+ : base ( null , documentLinks , canInclude , mappedBy )
4143 {
4244 InternalThroughName = internalThroughName ;
4345 }
@@ -50,14 +52,15 @@ public HasManyThroughAttribute(string internalThroughName, Link documentLinks =
5052 /// <param name="internalThroughName">The name of the navigation property that will be used to get the HasMany relationship</param>
5153 /// <param name="documentLinks">Which links are available. Defaults to <see cref="Link.All"/></param>
5254 /// <param name="canInclude">Whether or not this relationship can be included using the <c>?include=public-name</c> query string</param>
55+ /// <param name="mappedBy">The name of the entity mapped property, defaults to null</param>
5356 ///
5457 /// <example>
5558 /// <code>
5659 /// [HasManyThrough("tags", nameof(ArticleTags), documentLinks: Link.All, canInclude: true)]
5760 /// </code>
5861 /// </example>
59- public HasManyThroughAttribute ( string publicName , string internalThroughName , Link documentLinks = Link . All , bool canInclude = true )
60- : base ( publicName , documentLinks , canInclude )
62+ public HasManyThroughAttribute ( string publicName , string internalThroughName , Link documentLinks = Link . All , bool canInclude = true , string mappedBy = null )
63+ : base ( publicName , documentLinks , canInclude , mappedBy )
6164 {
6265 InternalThroughName = internalThroughName ;
6366 }
@@ -161,4 +164,4 @@ public HasManyThroughAttribute(string publicName, string internalThroughName, Li
161164 /// </example>
162165 public override string RelationshipPath => $ "{ InternalThroughName } .{ RightProperty . Name } ";
163166 }
164- }
167+ }
0 commit comments