Ich habe zwei Entitäten erstellen:Spring Data REST: Einheit mit @DbRef Feld
class User {
@DbRef
private Form form;
}
class Form {
}
und REST-Repositories @RepositoryRestResource
für beide.
Ich möchte neue User
Ressource erstellen, so dass ich mache POST
Anfrage mit nächsten json:
{
"form":"/forms/123"
}
Wo "/forms/123"
eine Referenzressource ist. Aber es funktioniert nicht. Es heißt "Could not read document: Can not construct instance of User: no String-argument constructor/factory method to deserialize from String value"
Sollte ich etwas aktivieren, damit es funktioniert?