For Model A
and B
with certain association, the following query create an INNER JOIN
A.findAll({include:[{model:B}], where:{...}})
The created SQL is:
SELECT * FROM A INNER JOIN B ON ...
How to generate LEFT JOIN
with include
instead?
set required
to false
A.findAll({include:[{model:B, required: false}]})
https://github.com/sequelize/sequelize/issues/3936#issuecomment-112082519
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments