I'm trying to send a POST request to save an entity in a Spring Data Rest repository.
The save is OK, but only for simple properties like Strings, etc...
But when I have to save a complex property (like a List<OtherEntity> otherEntities), the related object is not linked in the resource.
I'm trying to send a JSON in this format:
{
"property": "value",
"otherEntities" : "http://localhost:8080/myapp/api/otherEntities/1"
}
The object it's saved, but the link:
http://localhost:8080/myapp/api/objects/1/otherEntities
returns an empty array of "otherEntities" instead of the object reacheable at the url:
http://localhost:8080/myapp/api/otherEntities/1
Any idea it will be appreciated.