Open spring-projects-issues opened 8 years ago
Jose Montoya commented
Might be related to https://jira.spring.io/browse/DATAREST-771 as making the relation unidirectional allows the insert to happen, but I need it to be bidirectional
Davy De Waele commented
If you want to keep it bidirectional I think you have 2 options :
@JoinTable
on both ends to manage the one-to-many relationship.@JoinColumn
on both nds if you don't want to use a jointable (make you have a joincolumn on both sides of the relationship with the same column nameI do wonder if this is by design or if this is a bug in Spring Data REST
Jose Montoya opened DATAREST-784 and commented
When I submit the POST a text/uri-list to a
@OneToMany
I get a 204 response, but I can see the SQL on my console only Selecting and not inserting anything. EDIT: I use Postman, but here's the curl command that does/returns the samecurl -v -X POST -H "Content-Type: text/uri-list" -d "http://localhost:8080/games/2" http://localhost:8080/developers/1/gameList
And the logger on IDEA:
Here are my relevant classes:
Other one:
If I misunderstood the docs, or I'm doing something wrong, or this is a known issue (couldn't find any) please let me know
Affects: 2.5 M1 (Hopper)
Reference URL: http://stackoverflow.com/questions/35910850/spring-boot-data-rest-post-returns-204-but-only-selects/35926199
1 votes, 4 watchers