Skip to content

Commit 2691dea

Browse files
committed
chore: add comment to fix
1 parent 0cbd2ef commit 2691dea

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/JsonApiDotNetCore/Data/DefaultEntityRepository.cs

+3
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,9 @@ private IList GetTrackedManyRelationshipValue(IEnumerable<IIdentifiable> relatio
326326
{
327327
if (relationshipValueList == null) return null;
328328
bool _wasAlreadyAttached = false;
329+
/// if we're not using entity resource separation, we can just read off the related type
330+
/// from the RelationshipAttribute. If we DO use separation, RelationshipAttribute.DependentType
331+
/// will point to the Resource, not the Entity, which is not the one we need here.
329332
bool entityResourceSeparation = relationshipAttr.EntityPropertyName != null;
330333
Type entityType = entityResourceSeparation ? null : relationshipAttr.DependentType;
331334
var trackedPointerCollection = relationshipValueList.Select(pointer =>

0 commit comments

Comments
 (0)