just wondering if POST of new objects in new entities is possible.
Person.java
@Entity
public class Person {
@oneToOne(optional = false)
private Address address;
}
Address.java
@Entity
public class Address {
private String street;
}
What I would like to do is create a Person with an address in a single HTTP request. Is this possible with something like the request below?
curl -i -X POST -H "Content-Type: application/json" /
-d '{"address": {"street":"street 1"}}' http://localhost:8080/people
So far, my investigation and search for documents say no. But I thought I would ask here before I refuse.
Thank.
source
share