It seems the relationship serializer is trying to serialize the data even if its null, and then blowing up at: String id = JsonApiResourceIdentifier.getId(data, jsonApiConfiguration).value;
Am i doing something incorrect? I assume the fact that the relationship has an overload that takes no entity object means this is valid, yet it seems to be failing for me.
According to the spec data is not required: A “relationship object” MUST contain at least one of the following:
But if i try to do:
return jsonApiModel() .model(pageEntityModel) .relationship("space", null, "Some link here", Links.NONE) .build();
I get: Cannot compute JSON:API resource id.::: null (through reference chain: com.toedter.spring.hateoas.jsonapi.JsonApiDocument["data"]->com.toedter.spring.hateoas.jsonapi.JsonApiData["relationships"]->java.util.HashMap["space"]
It seems the relationship serializer is trying to serialize the data even if its null, and then blowing up at: String id = JsonApiResourceIdentifier.getId(data, jsonApiConfiguration).value;
Am i doing something incorrect? I assume the fact that the relationship has an overload that takes no entity object means this is valid, yet it seems to be failing for me.
Thanks!