Closed jAddict7 closed 10 years ago
You've raised a couple of issues you are having with the combination of spring-data-rest and spring-data-dynamodb that are used in the demo. Thank you for raising these - I will see if I can find some time at some point to resolve them.
It seems that there have been some changes to spring-data-rest since I created the demo and some things no longer work as they did - for example the ids are not displayed correctly in the JSON response and you are having issues posting.
I feel I need to explain that my work has been on the spring-data-dynamodb project, and I was just using spring-data-rest as an easy way to wire up spring-data-dynamob and demonstrate it is working.
Issues that relate to spring-data-rest ( urls to post to, id conversion etc) are not something I'm going to be able to help you with immediately unfortunately. I haven't yet had the chance to read up about changes that have been made to spring-data-rest since I created the demo.
It seems that the functionality of spring-data-dynamodb is working for you ( with the possible exception of the @NotNull validation that you have raised separately, which I hope to look into soon) - but this issue with JSON binding is spring-data-rest issue
Perhaps it may help you to resolve these issues if you direct questions about spring-data-rest to the community leads for that project, as these are not directly related to spring-data-dynamodb and I'm not really in a position to resolve these at the moment.
Yeah I understand, Sort issue comes under Spring-Data-DynamoDB I think so, if possible have a look at it. I have done validation using basic validators as far now and working fine. Sorting makes me a big deal till now.
Here in Test.java, * this.setId(id);* and this.setName(name); should be replaced with * this.testId.setId(id);* and this.testId.setName(name); respectively.
Domain Class:
Supporter Class:
I think I have created Domain class correctly but What is the correct procedure to Post data into it. I have tried, URL: http://localhost:8080/tests Request Body: {"testId": {"id": "gowtham", "name": "z"}, "description": "Awesome Guy", "testing": "x"} and {"id": "gowtham", "name": "z", "description": "Awesome Guy", "testing": "x"}
But both failed and throws an exception as, { cause: { cause: { cause: null message: null }- message: "N/A (through reference chain: pkg.Test["id"])" }- message: "Could not read JSON: N/A (through reference chain: pkg.Test["id"]); nested exception is com.fasterxml.jackson.databind.JsonMappingException: N/A (through reference chain: pkg["id"])" }
But id object is present. What is the correct way to pass argument in POST method?