This current code is working :
app.models.AvionPiloteAutorisation.find({
"where": {
"idAvion": avion.idAvion
},
"include": ["pilote"]
}, function(err, pilotes) { ... }
But this :
app.models.AvionPiloteAutorisation.find({
"filter": {
"where": {
"idAvion": avion.idAvion
},
"include": {
"relation": "pilote"
}
}
})
fail. It's suppose to be the same, right ?
I'm trying to add some information using related model 'Utilisateur'
app.models.AvionPiloteAutorisation.find({
"filter": {
"where": {
"idAvion": avion.idAvion
},
"include": {"relation": "pilote", "scope": {"include": ["utilisateur"]}}
}
})
What am I doing wrong ?
Thanks.
"include": [ { ... } ](notice that I made it an array with an object versus just an object). - Jordan Kasper