I have a rest api which reads a document from mongo collection and one more API which adds/updates the document into the same collection.
I have upgraded project to Spring-data-mongo 2.4.3 and now I have a problem.
Below is Objectid for a row
57d7171c02666d68cb2ec50b
It translates to the corresponding json
{ "timestamp": 1473713948, "counter": 3065099, "randomValue1": 157293, "randomValue2": 26827 }and in API response I get below output
{{ "id":
{ "timestamp": 1473713948, "counter": 3065099, "randomValue1": 157293, "randomValue2": 26827 },
"product": "ABCD"}
Now if I update the product name to something else and use the second API to post the same content, instead of updating the row, it is creating a different row.
*{{ "id":
{ "timestamp": 1473713948, "counter": 3065099, "randomValue1": 157293, "randomValue2": 26827 },*
"product": "EFGH"}
Now the new ObjectId for new row is below
57d7171c07430961eb07d9e2
Intrestingl both translates to the same json as above.**
this is happening in latest version of spring-data-mongo only.... earlier version 2.0.1 is good.****
Not sure if the issue is with BSON ID, or JACKSON or MONGO DRIVER itself.****
Please assist us on this issue.****
- mentioned in
-
Page Loading...