Category "mongodb"

Mongoose and MongoDB - Get all countries and users associated with country

So I have a list of posts data that looks like this: [ {user: 'Bob', country: 'USA'} {user: 'Kim', country: 'Mexico'} {user: 'Darren', country: 'Mexico'}

Loading libzstd.dll in C# ASPNet Framework application

I'm upgrading the mongo driver to an ASPNet Framework (4.8) application from 2.7.3 to the latest, 2.15.0. I just use VS to upgrade the nuget packages, nothing

Upadating documents not possible due to lack of atomic operators?

I am trying to update my collection through mongodb shell but unsuscessfully due to this error: "Update document requires atomic operators" db.dogs_main_breed.u

java.lang.NoSuchMethodError: com.mongodb.client.MongoCollection.insertOne exception when inserting entry to Javers Mongodb collection

I am able to insert the data to mongodb collection. Same time Javers framework trying to insert the data to jv_snapshots collection. Data insertion to jv_snapsh

Enable Mongo free-monitoring on a AWS EC2 instance?

I'm trying to enable the MongoDB Free Monitoring on an EC2 instance, but I got the error: Unable to get immediate response from the Cloud Monitoring service. W

AfterDeleteEvent from AbstractMongoEventListener is not being triggered when entry is deleted from MongoDb

I have a class that extends AbstractMongoEventListener and overrides onAfterSave and onAfterDelete. The onAfterDelete does not trigger for some reason. The onAf

How to solve Vercel 500 Internal Server Error?

I have created a project that uses MongoDB to store user info and Next-Auth to authenticate users. On local host this is all working seamlessly. Previously I ha

How to query a document mongodb and react

I wonder why this is not working… This function should return true if there are any documents that match query. Thing I want to do is if the frequency is

MongoDB connetion will not close in Jest afterAll()

Here's the current state of my setup and tear down methods: beforeAll(async () => { // await populate(); try { await client.connect(() =>

Is there anyway working with schemas in Deno?

I am trying to store and work with a similar to following structure data using Deno and MongoDB. [ { id: "AAPL", stockData: [

How to Insert new documents according to a condition that can be appliyed on one of them

I have a collection where I store unique uID for a user and I also have to register them manually. While registration I pass multiple IDs in an array and now I

Is there a way to cast a string of only hh:mm to Date in Javascript

I have a business hours object in a mongoose schema that represent a date. I'm passing a json object and retrieving the to parse to Date as string. I wonder if

How to make a query includes both count and data of collection

Example data [ { owner: '0x123124124', createdAt: '13 May 2022 at 04:20:21 UTC'}, { owner: '0x123124124', createdAt: '13 May 2022 at 06:20:21 UTC'}, {

Where do I find my dbname for MongoDB connection string?

I'm trying to connect my app to mongodb, and I got a connection string from mongodb atlas, requiring me to replace username and password, which I get it, but it

Query over a field which is deep inside MongoDB collection using array of possible options

I have a list of commentDocument collection in MongoDB where each has the following structure: { "commentName": "test comment", "outputs": { "ex

Why can't I connect to mongoDB atlas?

I am new in MongoDB, all my life I used MySQL. I have created an account in atlas, set the IP to my IP and created a user and saved the password. here is my cod

How to query Child Reference Pattern collection with $graphLookup

I have a collection with child reference. Each document can have multiple parents. How can I query it with $graphLookup in order to make a result prepared for a

How to upload a single image file with next.js to mongodb?

When I'm uploading form data to mongodb, in the image section it shows this: "C:\fakepath\imageName.jpg" with no actual image in it. And when I fetch the data f

MongoStore.create({ ..............Cannot read property 'create' of undefined

I have tried every possible step I've come across but the problem doesn't resolve. The error shows: C:\Users\...............\server.js:35 store: MongoStore.crea

Is there a way to avoid stringValue Favicon.ico error in express js

I am trying to build an application in my Express and anytime i navigate to the admin page i get this error const castError = new CastError();