I am trying my luck here, I have a model which is like the following public class RowData : BaseBsonDefinition { . [BsonExtraElements] [BsonDictionaryOption
I Write My code like this but it has error, How to rewrite this code db.collection('collection_name').insertOne({ name:req.body.name, details:[{ age:req.body.ag
What is the reason behind this error? this code I am using to connect to DB. const uri =`mongodb+srv://${process.env.DB_USER}:${process.env.DB_PASSWORD}@cluster
//** If I'm adding a new document with the name: "India", then I don't want that the DB allow another name with the name: "INDIA", "india", "indIA", etc. I'm ne
Why would MongoDb (4.2.6) return every row from an index (Collation locale: en_US, strength: 1), when searching for a string contained in the document field? E
I have this mongoose schema const PictureSchema = mongoose.Schema({ user: { type: mongoose.Schema.Types.ObjectId, ref: 'User', requi
I'm working on social media platform and I need to fetch posts for newsfeed with mongodb search query. currently I'm using dynamic index on my post collection,
I use mongoDB, after run server site 1st time all data load and display in UI. But whenever I try to show dynamic route using an event handler , and this give m
enter image description here This error is showing when I connect the MongoDB now how can I solve it
I have a model that uses a Map for eg: (I also have other properties such as Name) export class User { _id!: string; accounts!: Map<String,Number>
I am trying to get authorization working on a mongo database on a new Ubuntu machine. I have created an admin user with the role userAdminAnyDatabase: admin>
I'm creating an application in the MERN stack and I stumbled upon a problem. I will start by explaining how that app is going to work. So, in that application u
I want to write a code in following scenario : we want to design an invoice generator.this invoice generator also generates an incremental invoice no .Also note
I work with Mongoengine in Django, got task to sort by first_name, last_name fields ignoring case and leading whitespaces that is why add collation in queryset:
I want a single object from the collection that counts and calculates average. The collection looks like this: [{ "_id" : ObjectId("617822b1d128026ff4c76a76
I tried to connect a remote MongoDB Server running on Ubuntu using MongoDB Compass on Windows. But I have problems connecting always as the IP of the Windows ma
Here is my very basic product schema: const productSchema = new Schema({ productName: { type: String, required: true, }, productDescription: {
So I want to display MongoDB data in HTML so I used the EJS template but this is the error it is showing . I can't seem to figure out where the problem is, IS i
Before to submit the doubt that I have, let me start from preamble that I'm definitively a newbie on MongoDB world ;( but I'm going to learn quickly! The goal t
Can anyone tell me where I am going wrong. All I am trying to do is name a Mongo database using docker compose. I have a docker compose file that looks like thi