Skip to content

Commit 7de22a1

Browse files
committed
refactor(generic-processor): use new attr on relationship
1 parent 1fe4870 commit 7de22a1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/JsonApiDotNetCore/Internal/Generics/GenericProcessor.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ public async Task UpdateRelationshipsAsync(object parent, RelationshipAttribute
2121
{
2222
var relationshipType = relationship.Type;
2323

24-
// TODO: replace with relationship.IsMany
25-
if(relationship.Type.GetInterfaces().Contains(typeof(IEnumerable)))
24+
if(relationship.IsHasMany)
2625
{
2726
var entities = _context.GetDbSet<T>().Where(x => relationshipIds.Contains(x.Id.ToString())).ToList();
2827
relationship.SetValue(parent, entities);

0 commit comments

Comments
 (0)