SQL joins not working properly when database schema is provided when creating Sequelize instance (ibmi dialect) #17376
Labels
pending-approval
Bug reports that have not been verified yet, or feature requests that have not been accepted yet
type: bug
Issue Creation Checklist
Bug Description
Sequelize generates a wrong SQL statement when the
schema
property is defined when the Sequelize instance is generated. When I remove theschema
property from the Sequelize instance itself, and instead add the schema to the initialization of each model, it works correctly.SQL generated when using
schema
property in the Sequelize instance (and NOT on Model initialization): WRONGSQL generated when using
schema
property in the initialization of each model (and NOT on Sequelize instance): CORRECTReproducible Example
Here is the link to the SSCCE for this issue:
What do you expect to happen?
Using one
schema
property for the whole instance, or one for each model should not make any difference in the SQL output generated by sequelize. I expect in both cases to see the working SQL output (code block 2)What is actually happening?
Sequelize generates an incorrect SQL JOIN statement when using the Sequelize instance
schema
propertyEnvironment
Would you be willing to resolve this issue by submitting a Pull Request?
Indicate your interest in the resolution of this issue by adding the 👍 reaction. Comments such as "+1" will be removed.
The text was updated successfully, but these errors were encountered: