Category "mongodb"

Connecting a MongoDB serverless database to Mongo Charts

I want to connect a serverless MongoDB instance to MongoDB charts. I don't see any of my serverless instances when I try to add data sources on my Mongo Chart d

Spring Boot MongoDB the field with version annotation does not increment

This question asked several times before, but the answers in these questions didn't work for me. This is my Book document @Document @NoArgsConstructor @ToString

How do I get the POST data from a netlify serverless function?

Here is the code for my server which works fine. I am trying to achieve this with netlify's serverless functions which I have pasted further below. CODE ON STAN

Multer GridFsStorage Dynamic Configuration for Multiple MongoDB Connections

So I'm using MongoDB Atlas, Mongoose, Multer and GridFsStorage to upload files to a single database on the cloud which works fine, but I want to be able to uplo

Mongoose and Next.js: Unhandled Runtime Error TypeError: Cannot read properties of undefined (reading 'Token')

I basically defined this Model, much like another which doesn't error out; So I am stumped as to why it's not working... Here is a Minimal, Reproducible Example

I want to find the last object which i'm posting in my database without any condition but i can't find any method for that

Data.findOne({}).then((respp)=>console.log(respp, "find one")) Like I have this method this is returning First object and if I apply a condition then i can

How to sort data based on entry of parent collection in mongodb using mongooose package

How to sort data based on entry of parent collection in mongodb using mongoose package. My schema is organised as given below Profile Schema const mongoose

Immutables autogenerated for MongoDB throws "Can't find a codec for class Immutable.."

Problem Description. So I have an item that I want to use with MongoDB @Value.Immutable @Gson.TypeAdapters @Criteria.Repository interface Person { @Criteria

Java MongoDB numberLong query - Unable to fetch records

I wanted to fetch records between 1 date to other date from mongodb collection, where dates are stored as long in currenttimemillis. So I specified the query in

How to implement transactional management in mongo with graphql?

I'm currently working on a movie database with graphql and mongodb. When a new review is added I want to push the review id immediately to the reviews array of

Find all circles that contain a given point with a mongodb query

I have a set of circles, defined by points (centers) and a varying radius around it (green, black). I want to query if a given point (red) is contained any of t

mongoDB search query taking long when I use regular expression and case-insensitive

I am using MongoDB\Driver\Manager my query is shown below. $globalSearchValue = 'Test'; $mongo = new MongoDB\Driver\Manager("mongodb://localhost:27017"); $b

Mongodb aggregate lookup for merged collections?

Merged queries takes more time for requests, for instance having a username query from user collection and having a query from productpost, costs server process

How to send query with variables from Rstudio to Mongo database?

I'm trying to send query to my Mongo database depending on a variable producted in my R code. Unfortunately, Mongo query needs double quotes and the function "p

How would YouTube store data of who liked which videos?

If Youtube uses MongoDB as their database, then how would they store the who liked which videos information? Option 1: Store it in the Videos collection with a

Doctrine ODM query by subfield of reference-one [duplicate]

I have an existing MongoDb database: Foo { "_id": ObjectId(123456789), "name": "foo_1", "barId": 123, "sellerId": 456 } Bar { "_id"

How does mongodb decide which index to use for a query?

When a certain query is done on a mongodb collection, if there are multiple indexes that can be used to perform the query, how does mongodb choose the index for

Error: querySrv ESERVFAIL _mongodb._tcp.cluster0.abcd0.mongodb.net

My nodejs app was working fine with mongodb connection and suddenly this error got appeared. Then I tried to connect to mongodb with mongo compass and same erro

Why heroku app is not accepting the form data?

I have deployed an app on Heroku that contains a form. When someone submits the form, the content of the form is stored in an Atlas MongoDB database. This works

Bootstrap failed: 5: Input/output error while running any service on macOS Big Sur version 11.5.2

I am trying to run [email protected] service using brew services start [email protected] (facing similar error, while running httpd service or any oth