We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Example:
public sealed class Engagement : EntityBase<Guid> { [HasMany] public ICollection<EngagementParty> Parties { get; set; } } public sealed class EngagementParty : EntityBase<Guid> { } public sealed class EngagementResourceDefinition : JsonApiResourceDefinition<Engagement, Guid> { public EngagementResourceDefinition(IResourceGraph resourceGraph) : base(resourceGraph) { } public override IReadOnlyCollection<IncludeElementExpression> OnApplyIncludes( IReadOnlyCollection<IncludeElementExpression> existingIncludes) { ResourceContext engagementContext = ResourceGraph.GetResourceContext<Engagement>(); RelationshipAttribute partiesRelationship = engagementContext.Relationships.Single(relationship => relationship.Property.Name == nameof(Engagement.Parties)); HashSet<IncludeElementExpression> newIncludes = existingIncludes.ToHashSet(); newIncludes.Add(new IncludeElementExpression(partiesRelationship)); return newIncludes; } }
The query gets composed and executed properly, but the serializer forgets to take additions from IResourceDefition<,>.OnApplyIncludes into account.
IResourceDefition<,>.OnApplyIncludes
The text was updated successfully, but these errors were encountered:
bart-degreed
Successfully merging a pull request may close this issue.
Example:
The query gets composed and executed properly, but the serializer forgets to take additions from
IResourceDefition<,>.OnApplyIncludes
into account.The text was updated successfully, but these errors were encountered: