不要怂,就是干,撸起袖子干!

Commit 2a1ca0c6 by syldor

add where clause

1 parent 99824b27
Showing with 6 additions and 1 deletions
...@@ -540,7 +540,12 @@ This will produce an outer join. However, a `where` clause on a related model wi ...@@ -540,7 +540,12 @@ This will produce an outer join. However, a `where` clause on a related model wi
User.findAll({ User.findAll({
include: [ include: [
{model: Tool, as: 'Instruments', include: [ {model: Tool, as: 'Instruments', include: [
{model: Teacher, include: [ /* etc */], required: false} {
model: Teacher,
where: {
school: "Woodstock Music School"
},
required: false}
]} ]}
] ]
}).then(function(users) { }).then(function(users) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!