JSON Patch to subresource collection results in SpelEvaluationException: Method size() cannot be found [DATAREST-1039] #1405
Comments
Oliver Drotbohm commented That should be fixed now. We now rather inspect the type than the object to find out about the type to unmarshal the incoming JSON into. Also we now transparently initialize uninitialized collections |
Josh Wand commented (y)(y) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Josh Wand opened DATAREST-1039 and commented
I am trying to use JSON Patch to add a subresource to a collection.. using the canonical Post -> Comment relationship with OneToMany and ManyToOne and a PostRepository, as suggested by Oliver here:
http://stackoverflow.com/questions/25311978/posting-a-onetomany-sub-resource-association-in-spring-data-rest/25451662#25451662
and following Mathias's answer here:
http://stackoverflow.com/questions/34843297/modify-onetomany-entity-in-spring-data-rest-without-its-repository/34864254#34864254.
Using 2.6.1 (as imported by Boot 1.5.2.RELEASE):
Sending PATCH to
/posts/1
with:gives the following exception:
Sample project with failing tests attached.
I can't get this basic boot/restmvc project running with Kay-M1 so unable to test there
Affects: 2.6.1 (Ingalls SR1)
Attachments:
Referenced from: commits 0813faf, 9ee2d43, 9a95127, 6d8caf6
Backported to: 2.6.4 (Ingalls SR4), 2.5.11 (Hopper SR11)
1 votes, 3 watchers
The text was updated successfully, but these errors were encountered: