You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Prepend database to table name (Cross database joins) #2049
database: A table: user_report
database: B table: user , report
UserReport is a relevance table contains a user_id and report_id.
Sequelize only append the database name on the main table.
For the above case , it will generate the sql like " select A.user_report.user_id ..... from A.user_report left join user on A.user_report.user_id = user.user_id ... ...", so it will raise a error saying " table 'user' doesn't exists"
Reacted by Naoto Ida, Foysal Ahamed, Andrej Janoga, Matt, Konrad Jiménez and biruks
changed the title [-]Request for adding the database name in generated sql to implement the join across databases[/-][+]Prepend database to table name (Cross database joins)[/+]on Jul 5, 2016
I would love to help out and get this implemented. @sushantdhiman can you or any one of the contributors point me to the right directions to get started? some clues would be helpful.
Activity
[-]Request for adding the database name in generated sql to implement the join across databases[/-][+]Prepend database to table name (Cross database joins)[/+]Naoto-Ida commentedon Jul 21, 2016
I'm having the exact same issue with MYSQL, not MSSQL.
I have two databases that are on the same server.
Joining them in a statement is essential for our API, and I think this is needed by many people.
foysalit commentedon Dec 14, 2018
I would love to help out and get this implemented. @sushantdhiman can you or any one of the contributors point me to the right directions to get started? some clues would be helpful.
valoupeca commentedon Jun 20, 2019
Hello, any update about this issue ? I've got 2 databases in Postgres and i can't associate User fromdatabase1 with Profil from database2
biruks commentedon Aug 9, 2019
Any update on this?
papb commentedon Aug 9, 2019
@biruks #10281 is WIP for mysql for this.
Rajat117 commentedon Jan 22, 2020
Anu updates on this issue
eleezs commentedon Jan 3, 2024
I am having the same problem on Postgres. Any update yet?