Mongoose multi-table fuzzy query

this.find({}).populate({
            path: "userId",
            match: {name: "123123x"}
        }).exec(callback);

the associated query of two tables, and how to make the whole data not return when there is no data in the associated table

May.22,2021

use aggregate queries

db.projects.aggregate([{
    $lookup:{
        from:'users',
        localField: 'userId',
        foreignField: '_id',
        as: 'userinfo'
        }
},{
    $match:{
        'userinfo.sex': '0'
}},{"$unwind": "$remark"}])
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b31ac0-4ea18.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b31ac0-4ea18.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?