I'm building an application using Spring Data Rest. i have a Many to One relationship backed by a non-nullable foreign key. Which is the correct way to add an element on the "Many" side of the relationship using the REST API?
Asked
Active
Viewed 2,671 times
1 Answers
2
This happened to work:
POST http://server:8080/context/manyEntity
{"manyId":"manyIdValue","manyAttribute1":"manyAttribute1Value",...,"oneEntity":{"oneId":"oneIdValue"}}

Andres
- 10,561
- 4
- 45
- 63