{"action":"reopened","issue":{"url":"https://api.github.com/repos/feathersjs/feathers-mongodb/issues/25","repository_url":"https://api.github.com/repos/feathersjs/feathers-mongodb","labels_url":"https://api.github.com/repos/feathersjs/feathers-mongodb/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/feathersjs/feathers-mongodb/issues/25/comments","events_url":"https://api.github.com/repos/feathersjs/feathers-mongodb/issues/25/events","html_url":"https://github.com/feathersjs/feathers-mongodb/issues/25","id":135821230,"number":25,"title":"Update/patch (PUT/PATCH) strips \"id\" from saved object","user":{"login":"joshuajabbour","id":66879,"avatar_url":"https://avatars.githubusercontent.com/u/66879?v=3","gravatar_id":"","url":"https://api.github.com/users/joshuajabbour","html_url":"https://github.com/joshuajabbour","followers_url":"https://api.github.com/users/joshuajabbour/followers","following_url":"https://api.github.com/users/joshuajabbour/following{/other_user}","gists_url":"https://api.github.com/users/joshuajabbour/gists{/gist_id}","starred_url":"https://api.github.com/users/joshuajabbour/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshuajabbour/subscriptions","organizations_url":"https://api.github.com/users/joshuajabbour/orgs","repos_url":"https://api.github.com/users/joshuajabbour/repos","events_url":"https://api.github.com/users/joshuajabbour/events{/privacy}","received_events_url":"https://api.github.com/users/joshuajabbour/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-23T18:24:35Z","updated_at":"2016-02-23T20:01:50Z","closed_at":null,"body":"I'm still working on a test case, but I'm having issues with the update action. Not sure if it's in this module or another, but here are the details:\r\n\r\n- Using custom `id` field (`id`, not `_id`)\r\n- `PUT /resources/123` with body `{\"id\": \"123\", \"title\": \"#123\"}` strips out the id field upon save.\r\n\r\nThis doesn't help, as it's not honored either; the `id` field _is_ added to `hook.data`, but stripped again sometime before saving:\r\n\r\n```js\r\n  service\r\n    .before({\r\n      update (hook) {\r\n        // Copy ID from request into object.\r\n        hook.data.id = hook.id\r\n      }\r\n  })\r\n```"}}