Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MongoDb connector : Error "E11000 duplicate key error index: _id: {_id} when use PATCH api #4347

Open
natuan62 opened this issue Mar 14, 2021 · 1 comment

Comments

@natuan62
Copy link

natuan62 commented Mar 14, 2021

I research some solutions like

loopback MongoError: E11000 duplicate key error collection: my-db.News index: _id_ dup key

// set /models/ .json like

// or 
"idInjection": false,
"forceId": false

// or set
 "properties" : {
  "id": {
     "type": "string",
     "mongodb": {dataType: 'ObjectId'}
  }
}

// or set in model-config.json
  "options": {
      "strictObjectIDCoercion": true
    }

but still not working

@stale
Copy link

stale bot commented Jul 21, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jul 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant