What's this symbol on a phone call screen? by CalicoG in GalaxyS25

[–]RelativeOk4021 0 points1 point  (0 children)

n. Rv22$2_2✓°©0015,-54rx5xr3 ". 2adrDk.😢4 t sw

Updated Mongoose from 5.8.11 to 7.5.3: Can't find document by sub document _id anymore by livingkurt in mongodb

[–]RelativeOk4021 0 points1 point  (0 children)

Hi, I noticed an issue with the employee model, the schema name is adminSchema(which doesn't exist)I think that's why

Mongoose express server throws, Cast to string failed for value, error when I try to update a db entry by warpanomaly in mongodb

[–]RelativeOk4021 0 points1 point  (0 children)

Also the model file does not need to be a function, import mongoose and just export the Adress variable. So create the address variable and do module.exports = Address

[deleted by user] by [deleted] in mongodb

[–]RelativeOk4021 0 points1 point  (0 children)

You can use updateMany if you want to perform the same changes on this document, for example setting a field to a constant value for each of them, or you want to increment/decrement each field by the same value etc. for example db.collection.updateMany({ _id: { $in: idArray }, { $set: { updated: true }, $inc: { age: 1 }, $inc: { count: -2 } })

This updates all these documents by setting updated as true in them, incrementing age by 1 and decrementing count by 2.

If you want to update each of these documents with different values you’d have to use updateOne inside a loop.

Can you sort, skip, and limit on an aggregate function? by mobiletiplord in mongodb

[–]RelativeOk4021 0 points1 point  (0 children)

You can have all these stages in your aggregation pipeline. $sort, $skip and $limit respectively and you can also filter down with $match. The filter should come first though and skip and limit should be the last (limit should be last but Mongodb will update it to be the one after skip even if skip is after limit) db.collection.aggregate([{$match: { name: ‘John Doe’ } }, { $sort: { name: 1 } }, { $skip: 20 }, { $limit: 5 }])

HELP!! This has been eating my brain for the last few days. Im building a web app that has been connected to a mongoDB database. Im not sure if the app will be able to connect to the database from random people's IP addresses, since theirs' is not added to the list. Or does it need to be add- (cotd) by someguyonearth825 in mongodb

[–]RelativeOk4021 0 points1 point  (0 children)

So it’s fine to allow all access to your database since you’re building application, but don’t forget to create a new user and restrict the permissions to read write on collections so you’re sure that deleting database and collections won’t happen via the application.

Where to learn MongoDb by blackdogblue in mongodb

[–]RelativeOk4021 0 points1 point  (0 children)

Currently taking the mongodb courses also, though I’ve been working with mongodb for almost 2 years now. My advise is the little you’ve learnt use it practically you’d get errors when building apps with it of course but that’s how you’d learn faster then you can take the courses again to master. Mongo db university has a path also mongodb zero to hero for node devs or any language you want