Open spring-projects-issues opened 8 years ago
Gabriel Bauman commented
Demo project, instructions to reproduce in README.md
Gabriel Bauman commented
Hmm, it appears that there are a number of related bugs. See DATAREST-733 and DATAREST-734
Gabriel Bauman commented
Added stack trace showing recursion
Jens Janssen commented
Have the same problem with "x-spring-data-verbose+json" and "x-spring-data-compact+json".
Invinite loop of:
"association" : false, "owner" : { "idProperty" : { "name" : "id", "rawType" : "java.lang.Integer", "field" : { "name" : "id", "type" : "java.lang.Integer", "modifiers" : 2, "annotations" : [ { }, { } ], "declaredAnnotations" : [ { }, { } ], "synthetic" : false, "declaringClass" : "Access", "enumConstant" : false, "genericType" : "java.lang.Integer", "annotatedType" : { "type" : "java.lang.Integer", "annotations" : [ ], "declaredAnnotations" : [ ] }, "accessible" : true }, "association" : false, "owner" : { ....
Thomas Kallenberg commented
Ran into the same problem. Does somebody knows a workaround?
Same problem with spring-data-rest & @RepositoryRestResource
.
Gabriel Bauman opened DATAREST-767 and commented
I have a test Spring Boot application with a single entity Contact and CrudRepository at /contact. There are no entity relationships.
When there are no entities in the database, the request:
curl 'http://localhost:8080/contacts' -H 'Accept: application/vnd.api+json'
Returns:
But, when I add a record to the database, the same curl request is infinitely recursive:
The server stack trace looks like this:
Affects: 2.4.2 (Gosling SR2), 2.4.4 (Gosling SR4)
Reference URL: http://stackoverflow.com/questions/35349908/why-does-requesting-jsonapi-metadata-from-a-spring-data-rest-repository-return-a
Attachments:
2 votes, 5 watchers