-
-
Notifications
You must be signed in to change notification settings - Fork 159
Closed
Labels
Description
class ModelA : Identifiable {
[HasOne] ModelB ModelB { get; set; }
}
class ModelB : Identifiable {
[HasOne] ModelA ModelA { get; set; }
int ModelAId { get; set; }
}
JsonApiDotNetCore.Internal.JsonApiException : Failed to deserialize request body
---- JsonApiDotNetCore.Internal.JsonApiException : ModelA does not contain an relationsip named ModelB
JsonApiDotNetCore/src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs
Lines 167 to 170 in 5bf0e52
var entityProperty = entityProperties.FirstOrDefault(p => p.Name == $"{attr.InternalRelationshipName}Id"); | |
if (entityProperty == null) | |
throw new JsonApiException(400, $"{contextEntity.EntityType.Name} does not contain an relationsip named {attr.InternalRelationshipName}"); |