{"action":"closed","issue":{"url":"https://api.github.com/repos/sequelize/sequelize/issues/6307","repository_url":"https://api.github.com/repos/sequelize/sequelize","labels_url":"https://api.github.com/repos/sequelize/sequelize/issues/6307/labels{/name}","comments_url":"https://api.github.com/repos/sequelize/sequelize/issues/6307/comments","events_url":"https://api.github.com/repos/sequelize/sequelize/issues/6307/events","html_url":"https://github.com/sequelize/sequelize/issues/6307","id":166310967,"number":6307,"title":"Association between tables in different DB ignored","user":{"login":"Naoto-Ida","id":7748110,"avatar_url":"https://avatars.githubusercontent.com/u/7748110?v=3","gravatar_id":"","url":"https://api.github.com/users/Naoto-Ida","html_url":"https://github.com/Naoto-Ida","followers_url":"https://api.github.com/users/Naoto-Ida/followers","following_url":"https://api.github.com/users/Naoto-Ida/following{/other_user}","gists_url":"https://api.github.com/users/Naoto-Ida/gists{/gist_id}","starred_url":"https://api.github.com/users/Naoto-Ida/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Naoto-Ida/subscriptions","organizations_url":"https://api.github.com/users/Naoto-Ida/orgs","repos_url":"https://api.github.com/users/Naoto-Ida/repos","events_url":"https://api.github.com/users/Naoto-Ida/events{/privacy}","received_events_url":"https://api.github.com/users/Naoto-Ida/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-07-19T11:42:57Z","updated_at":"2016-07-21T06:05:30Z","closed_at":"2016-07-21T06:05:30Z","body":"I have two tables. They belong to different databases.\r\n\r\n```\r\nexport default db1.define(`hero`, {\r\nteamId: {\r\n    type: Sequelize.INTEGER\r\n    ....\r\n},\r\nname; {\r\n    type: Sequelize.STRING\r\n}\r\n....\r\n}\r\n\r\nexport default db2.define(`team`, {\r\nid: {\r\n    type: Sequelize.INTEGER\r\n},\r\nname; {\r\n    type: Sequelize.STRING\r\n}\r\n....\r\n}\r\n```\r\n\r\nThen in another file, I associate `hero` with `team` like this in another file.\r\n```\r\nimport Hero\r\nimport Team\r\nHero.hasOne(Team, {foreignKey: 'teamId'})\r\n\r\n```\r\n\r\nNow it is telling me that `\"ER_NO_SUCH_TABLE: Table 'db1.team' doesn't exist\"`.\r\nIt seems to be ignoring my db specification. Is this normal? And how should I counteract this?\r\nIt should be trying to associate `db1.hero` with `db2.team`.\r\nThanks.\r\n\r\n__Dialect:__ mysql\r\n__Database version: 5.6.31\r\n__Sequelize version: ^3.14.2\r\n"}}
{"actor":{"display_login":"Naoto-Ida"}}