Skip to content

Commit 733867f

Browse files
authored
chore: remove comment that no longer applies
1 parent 02fc513 commit 733867f

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -230,15 +230,6 @@ private object SetHasOneRelationship(object entity,
230230
return entity;
231231
}
232232

233-
/// @TODO investigate the following: when running the Can_Patch_Entity_And_HasOne_Relationship, the updating of the to-one relation happens
234-
/// by assigning a new value to the foreignkey on the TodoItem: todoItem.ownerId = new value.
235-
/// However, this happens in two places: here in this method, but also in the repository, here
236-
/// https://github.com/json-api-dotnet/JsonApiDotNetCore/blob/8f685a6a23515acf8f440c70d20444a0cec1c502/src/JsonApiDotNetCore/Data/DefaultEntityRepository.cs#L300
237-
///
238-
/// Is there a reason this happens twice? Should we need to get rid of one? It should probably happen in the repository only, not here,
239-
/// because in the case of one-to-one, updating a foreign key on the main entity (TodoItem in this case) is sufficient and can indeed be done from the deserializer,
240-
/// but when updating one-to-many or many-to-many, we will need to make extra queries, which is a repository thing.
241-
///
242233
private void SetHasOneForeignKeyValue(object entity, HasOneAttribute hasOneAttr, PropertyInfo foreignKeyProperty, ResourceIdentifierObject rio)
243234
{
244235
var foreignKeyPropertyValue = rio?.Id ?? null;

0 commit comments

Comments
 (0)