Category "mongodb"

Exceeded timeout of 5000 ms for a test with Jest and MongoDB

I'm trying to implement database population by using a migration function. The code works perfectly, it saves all the data into the database, but the test for t

How to store and retrieve checkbox state on refresh of page? Mongoose/EJS/Nodejs/Express

I have a checkbox, essentially like a to do list. When i check the box, I want to retain the state even after i refresh the page by using mongoose. I do know of

Boost search score from data in another collection

I use Atlas Search to return a list of documents (using Mongoose): const searchResults = await Resource.aggregate() .search({ text: { query

Bulk insert only when specified condition is met

I have an array of objects that look like this: { type: 'foo', value : 2, hashedIdentifier : ASDZXC, createdAt : '2022-02-27T14:17:44.860+00:00' } I would like

MongoDB ReplicaSet in K8S -- can't connect via port forward

I have a k8s dev cluster (in aks). I previously used the bitnami chart for deployment of a single MongoDB pod and I never had the following problem. As I'm now

$multiply query not working in Document DB

We have created a documentDb instance having a 4.0.0 version. When running the query using $muliply it throws an error as Bad Query. Query: 'test': { $multiply:

Finding documents that fit json input in mongodb

I'm trying to do a write statement that finds all the documents that fit the JSON data fed through a form. Here's an example of what the JSON looks like. I crea

How to implement pagination for fastapi with mongo db(Motor)

I have a simple REST api which is a books store created with FastAPI and mongo db as the backend (I have used Motor as the library instead of Pymongo). I have a

I am getting this error TypeError: Cannot assign to read only property 'map' of object '#<QueryCursor>' 2022-02-19T12:38:49.101286+00:00 app[web.1]:

I am trying to deploy my node.js app for weeks but I am not able to deploy it, Please can someone please help me to deploy this, I have done everything, but sti

Casting an object within a MongoDB document to date time within a filter definition builder

I am hoping someone can help me as I am new to Mongo DB or point me to a work around, I have a property within a Mongo DB document which is of type object, but

Access mongodb replica set pod (kubernetes) through another pod AND through external sources

I'm running minikube on my local machine, and I can easily connect to my MongoDB pod from both external/internal sources through this setting below WITHOUT the

Mongodb Realm custom JWT auth causes empty custom user data

I'm working on an app that currently uses email/password auth provided by MongoDB Realm. I'm thinking of switching to using the custom JWT auth for various reas

How to solve Node mon crashing problem when connecting mongo DB using NodeJS

Node mon app crashing problem when connecting Mongo DB using Nodejs

How to remove schema validation in mongoose (mongodb)?

I have MongoDB server version: 5.0.6 installed and used "mongoose": "^6.0.14" to create a model validation. Example of model: const User = new Schema({ name:

How to check if an area intercepts with any one of other given areas

Before asking this question I read these answers, but could not find the solution: Check if coordinate is within area Geolocation - Check if a location belongs

How can I use Mongo DB's database to subtract and add a quantity from an item using the put method from a button? [closed]

what problem my code ? I actually want to reduce and increase the quantity of some items from one button but I can't understand what is wrong

FORMIO questions total newbie

I'm tryin to learn FORM.IO, I'm a total newbie and have little knowledge with Javascript or client server or cloud. I have some questions, really sorry if they

When run node js application getting error whitelist ip in mongo cluster

I have implemented node js application and used MongoDB as database using nginx to run the project Everything working fine in local but when code is published i

NextJS: load global plugin in Mongoose before model creation

I have a folder structure looking something like this root/ pages/ models/ User.js utils/ plugin.js dbConnect.js I want to be able to load th

Copy nested array into plain one when it is only empty

How do I copy one nested array (urls2.url_breed) into an empty array url_alternative only if this one is empty like in this case? There are some cases when it i