hi, does anybody knows why Prisma generates such a...
# mongodb
p
hi, does anybody knows why Prisma generates such a heavy requests?
Copy code
db.Game.aggregate([{
    $match: {
        $expr: {
            $and: [{
                $in: ["$_id", [ObjectId("62b456c7548b0f401c499f49"), ObjectId("62b456e21955d39f37f9e45c"), ], ],
            }, {
                $or: [{
                    $ne: [{
                        $ifNull: ["$_id", null, ],
                    }, null, ],
                }, {
                    $eq: ["$_id", null, ],
                }, ],
            }, ],
        },
    },
}, {
    $project: {
        _id: 1,
        name: 1,
    },
}, ])
_id
is a mandatory field, so it can't be
null
, but we have a huge branch for it:
Copy code
$or: [{
                    $ne: [{
                        $ifNull: ["$_id", null, ],
                    }, null, ],
                }, {
                    $eq: ["$_id", null, ],
                }, ],
v
@PinkiePie apologies for the delay in helping out with this problem, a few people from our Support team are out of office, and unfortunately, I finished a monthly audit of unanswered questions only now! 😅 Have you perhaps already answered this question or are you still looking for help?
p
this question is not that important (at least for now) so if you have time I'd rather get an answer on this: https://prisma.slack.com/archives/C0281DB57HQ/p1656395218035119 a similar question was asked on the main channel by another dev as well: https://prisma.slack.com/archives/CA491RJH0/p1656946354676939 Prisma has some official API which is not documented and we have no idea on how to use it, so we have to use 3rd party libraries to achieve something that exists in Prisma, just because these 3rd party libraries have better docs on this
n
Note: We have created this GitHub Issue https://github.com/prisma/docs/issues/3423 to tackle lack of documentation of
$runCommandRaw
method.