我主要是想看看你将如何在这里进行内部联接。
SELECT * From "Users" as biz
INNER JOIN "Deals" as d
ON biz.id = d."UserId"
WHERE (biz.latitude BETWEEN 18 AND 21)
AND (biz.longitude BETWEEN -78 AND -73);
这是我从文档中得到的......但不确定如何继续进行
Deals.find({ where: { }, include: [User]})
答案 0 :(得分:0)
对inner join
required : true
所需要的只是Deals.find({
where: { },
include: [{
model : User ,
required : true // This will make your inner join
}]})
:
findAll
注意:使用
findOne
或find
代替{{1}}