Closed anupsaund closed 9 years ago
Did you try clearing out your database? I've confirmed the edit
feature is not working properly, but I can't reproduce your duplicate id issue
@bajtos When I edit any todo, the changes are not reflected in the database. Create and delete are working properly. Ideas?
@superkhau
I have tried a fresh test, and then tried to show the story in the following screenshots.
This is most likely a bug in the replication algorithm that have been fixed on loopback master. We should verify after a new version of the following modules was released: loopback, loopback-datasource-juggler, loopback-connector-mongodb. See https://github.com/strongloop/loopback/issues/1167.
@bajtos - I implemented the code change from https://github.com/strongloop/loopback/pull/973
It fixed the errors.
These errors should be fixed on master with my latest updates. Closing.
Issue Overview
I forked the loopback-example-full-stack and then created a datasource for mongoDB - mongo version 3.0.1. Then i changed the todo model to use mongodb as a datasource.
Creating and deleting a todo works OK - but if I try to edit a Todo I get a duplicate key error;
MongoError: E11000 duplicate key error index: test.Todo.$id dup key: { : "t-2159" }
Forked at
https://github.com/anupsaund/loopback-example-full-stack
One commit
https://github.com/anupsaund/loopback-example-full-stack/commit/a8ea1a4f68bda75cbfc5dd0426d21a1a0f715029
Screenshot