{"action":"closed","issue":{"url":"https://api.github.com/repos/feathersjs/feathers-sequelize/issues/60","repository_url":"https://api.github.com/repos/feathersjs/feathers-sequelize","labels_url":"https://api.github.com/repos/feathersjs/feathers-sequelize/issues/60/labels{/name}","comments_url":"https://api.github.com/repos/feathersjs/feathers-sequelize/issues/60/comments","events_url":"https://api.github.com/repos/feathersjs/feathers-sequelize/issues/60/events","html_url":"https://github.com/feathersjs/feathers-sequelize/issues/60","id":173046552,"number":60,"title":"Cannot call remove service method when id field name is custom","user":{"login":"petermikitsh","id":1571918,"avatar_url":"https://avatars.githubusercontent.com/u/1571918?v=3","gravatar_id":"","url":"https://api.github.com/users/petermikitsh","html_url":"https://github.com/petermikitsh","followers_url":"https://api.github.com/users/petermikitsh/followers","following_url":"https://api.github.com/users/petermikitsh/following{/other_user}","gists_url":"https://api.github.com/users/petermikitsh/gists{/gist_id}","starred_url":"https://api.github.com/users/petermikitsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petermikitsh/subscriptions","organizations_url":"https://api.github.com/users/petermikitsh/orgs","repos_url":"https://api.github.com/users/petermikitsh/repos","events_url":"https://api.github.com/users/petermikitsh/events{/privacy}","received_events_url":"https://api.github.com/users/petermikitsh/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/feathersjs/feathers-sequelize/labels/in%20progress","name":"in progress","color":"ededed"}],"state":"closed","locked":false,"assignee":{"login":"daffl","id":338316,"avatar_url":"https://avatars.githubusercontent.com/u/338316?v=3","gravatar_id":"","url":"https://api.github.com/users/daffl","html_url":"https://github.com/daffl","followers_url":"https://api.github.com/users/daffl/followers","following_url":"https://api.github.com/users/daffl/following{/other_user}","gists_url":"https://api.github.com/users/daffl/gists{/gist_id}","starred_url":"https://api.github.com/users/daffl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daffl/subscriptions","organizations_url":"https://api.github.com/users/daffl/orgs","repos_url":"https://api.github.com/users/daffl/repos","events_url":"https://api.github.com/users/daffl/events{/privacy}","received_events_url":"https://api.github.com/users/daffl/received_events","type":"User","site_admin":false},"assignees":[{"login":"daffl","id":338316,"avatar_url":"https://avatars.githubusercontent.com/u/338316?v=3","gravatar_id":"","url":"https://api.github.com/users/daffl","html_url":"https://github.com/daffl","followers_url":"https://api.github.com/users/daffl/followers","following_url":"https://api.github.com/users/daffl/following{/other_user}","gists_url":"https://api.github.com/users/daffl/gists{/gist_id}","starred_url":"https://api.github.com/users/daffl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daffl/subscriptions","organizations_url":"https://api.github.com/users/daffl/orgs","repos_url":"https://api.github.com/users/daffl/repos","events_url":"https://api.github.com/users/daffl/events{/privacy}","received_events_url":"https://api.github.com/users/daffl/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2016-08-24T20:12:02Z","updated_at":"2016-08-25T15:04:55Z","closed_at":"2016-08-25T15:04:55Z","body":"I'm having some issues with the `remove` service method.\r\n\r\nI've specified a custom id in my model, e.g.,\r\n\r\n```js\r\n  app.use('/tags', service({\r\n    id: 'uuid',\r\n    Model: tags\r\n  }));\r\n```\r\n\r\nBut when I call the `remove` method, this is the SQL that runs:\r\n\r\n```\r\nExecuting (default): DELETE FROM `tags` WHERE `id` = '9e098ec7-fc13-4478-ab22-68bd4c416637'\r\n```\r\n\r\nAnd the API returns error message:\r\n\r\n```\r\nER_BAD_FIELD_ERROR: Unknown column 'id' in 'where clause'\r\n```\r\n\r\nThe line looks suspect: https://github.com/feathersjs/feathers-sequelize/blob/master/src/index.js#L143\r\n\r\nI think the intended value is `this.id`, not just `id`."}}
{"actor":{"display_login":"daffl"}}