I\'m trying to implement a simple query that should look like this:
select * from property join entity_area on property.id=entity_area.entity_id and entity_a
I had this problem recently using sequelize 4.28.6, this is what worked for me
User.findAll(
{
where: {
$Tasks$: null,
},
include: [
{
model: Task,
// required: false,
},
],
limit: 3,
subQuery: false,
})
@yuriscom answer still works but, i didnt want to edit the sequelize codebase since the issue has been fixed and adding subQuery: false, works