#MongoDB help
9 messages · Page 1 of 1 (latest)
alright thanks i’ll look into it tomorrow
how to match _id in aggregate? sql $match: { _id: { userId: 654394128108355594, guildId: 713809761925070861 } } doesn't work
Test this:
$match: {
"_id.userId": 654394128108355594,
"_id.guildId": 713809761925070861
}
nope didn't work
Which libary you use to query MongoDB and how looks a sample entry of your data?
um I was using MongoDB with Spring boot application and I was executing the queries in Intellij IDE's mongodb console (or playground?).
[
{
"_id": {
"userId": 726189004315295804,
"guildId": 713809761925070861
},
"_class": "me.srin.userbot.database.Users",
"cooldown": 0,
"level": 0,
"name": "srin",
"totalXp": 0,
"trainingChannel": 0,
"trainingCount": 2,
"xp": 0,
"xpLimit": 100
}
]``` this is what a document looks like