{"action":"opened","issue":{"url":"https://api.github.com/repos/sequelize/sequelize/issues/5267","labels_url":"https://api.github.com/repos/sequelize/sequelize/issues/5267/labels{/name}","comments_url":"https://api.github.com/repos/sequelize/sequelize/issues/5267/comments","events_url":"https://api.github.com/repos/sequelize/sequelize/issues/5267/events","html_url":"https://github.com/sequelize/sequelize/issues/5267","id":127654540,"number":5267,"title":"Behaviour of alias (as) to foreignKey translations in associations should be synchronized.","user":{"login":"rmzg","id":1282791,"avatar_url":"https://avatars.githubusercontent.com/u/1282791?v=3","gravatar_id":"","url":"https://api.github.com/users/rmzg","html_url":"https://github.com/rmzg","followers_url":"https://api.github.com/users/rmzg/followers","following_url":"https://api.github.com/users/rmzg/following{/other_user}","gists_url":"https://api.github.com/users/rmzg/gists{/gist_id}","starred_url":"https://api.github.com/users/rmzg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmzg/subscriptions","organizations_url":"https://api.github.com/users/rmzg/orgs","repos_url":"https://api.github.com/users/rmzg/repos","events_url":"https://api.github.com/users/rmzg/events{/privacy}","received_events_url":"https://api.github.com/users/rmzg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-20T10:40:52Z","updated_at":"2016-01-20T10:40:52Z","closed_at":null,"body":"Right now the various associations (hasOne, belongsTo, hasMany, etc) treat aliases differently when attempting to create implicit, not defined, foreignKey names. This behaviour should be made consistent across all the different associations, either by using the alias as the foreignkey or not using it or by requiring an explicit foreignKey definition when using an alias as part of an association definition."}}