SubAccounts
This commit is contained in:
@@ -118,10 +118,32 @@ function getQueryProj(myfilter) {
|
||||
{ $match: myfilter },
|
||||
{
|
||||
$lookup: {
|
||||
from: "users",
|
||||
from: "listaingressos",
|
||||
localField: "ind_order",
|
||||
foreignField: "ind_order", // field in the user collection
|
||||
as: "user"
|
||||
as: "mylista"
|
||||
}
|
||||
},
|
||||
{
|
||||
$unwind: "$mylista"
|
||||
},
|
||||
{
|
||||
$lookup: {
|
||||
from: "users",
|
||||
as: "user",
|
||||
let: {username: '$mylista.username' },
|
||||
pipeline: [
|
||||
{
|
||||
$match: {
|
||||
$expr: {
|
||||
$and: [
|
||||
{ $eq: ['$username', '$$username'] },
|
||||
{ $eq: ['$idapp', myfilter.idapp] },
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user