Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to create relationships via PUT and ContentType:text/uri-list [DATAREST-1425] #1784

Open
spring-projects-issues opened this issue Sep 13, 2019 · 0 comments
Assignees
Labels

Comments

@spring-projects-issues
Copy link

@spring-projects-issues spring-projects-issues commented Sep 13, 2019

kalinwilson opened DATAREST-1425 and commented

At line 321 of RepositoryPropertyReferenceController.java:

if (source.getLinks().hasSingleLink())

should be 

if (!source.getLinks().hasSingleLink())

Correct requests with a single URI fail due to incorrect condition. Previous versions of the code used 

if (source.getLinks().size() != 1)

 

This makes the current version unusable for one-to-one and one-to-many relationships in resource/entity models.


Affects: 3.2 RC3 (Moore)

Reference URL: https://github.com/spring-projects/spring-data-rest/blob/master/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/RepositoryPropertyReferenceController.java#L321

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants