{"action":"closed","issue":{"url":"https://api.github.com/repos/sequelize/sequelize/issues/5828","repository_url":"https://api.github.com/repos/sequelize/sequelize","labels_url":"https://api.github.com/repos/sequelize/sequelize/issues/5828/labels{/name}","comments_url":"https://api.github.com/repos/sequelize/sequelize/issues/5828/comments","events_url":"https://api.github.com/repos/sequelize/sequelize/issues/5828/events","html_url":"https://github.com/sequelize/sequelize/issues/5828","id":152196406,"number":5828,"title":"Foreign key is being capitalised in query resulting in \"SequelizeDatabaseError: column Book.UserId does not exist\"","user":{"login":"alexdrans","id":2844540,"avatar_url":"https://avatars.githubusercontent.com/u/2844540?v=3","gravatar_id":"","url":"https://api.github.com/users/alexdrans","html_url":"https://github.com/alexdrans","followers_url":"https://api.github.com/users/alexdrans/followers","following_url":"https://api.github.com/users/alexdrans/following{/other_user}","gists_url":"https://api.github.com/users/alexdrans/gists{/gist_id}","starred_url":"https://api.github.com/users/alexdrans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexdrans/subscriptions","organizations_url":"https://api.github.com/users/alexdrans/orgs","repos_url":"https://api.github.com/users/alexdrans/repos","events_url":"https://api.github.com/users/alexdrans/events{/privacy}","received_events_url":"https://api.github.com/users/alexdrans/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-05-01T12:12:13Z","updated_at":"2016-06-20T13:42:06Z","closed_at":"2016-06-20T13:42:06Z","body":"## What you are doing?\r\nI am trying to perform a simple join;\r\n\r\n```js\r\nmodels.User.find({\r\n      where: {\r\n        emailAddress: request.payload.emailAddress\r\n      },\r\n      include: [{\r\n        model: models.Book,\r\n      }]\r\n    })\r\n```\r\n\r\n## What is actually happening?\r\nand I get the error '\"SequelizeDatabaseError: column Book.UserId does not exist\"'\r\n\r\nThe field is called 'userId'. How can I fix this?\r\n\r\n\r\n__Dialect:__ postgres\r\n__Database version: 9.4\r\n__Sequelize version: 3.20.0\r\n"}}
{"actor":{"display_login":"janmeier"}}