Category "mongodb"

Query with arbitrary number of filter conditions that come from querying the same collection

const score_schema = mongoose.Schema( { tester_id: { type: mongoose.Schema.Types.ObjectId, ref: "user", required: true, }, test_

Unhandled error event and cannot read properties of null nodemon app crashed

[nodemon] starting `node app.js` Server started on port 3000 node:events:505 throw er; // Unhandled 'error' event ^ TypeError: Cannot read properti

How to update and delete a review of a product using nodejs

I am creating a e-commerce app and now I want to update and delete a review of a product using nodejs and database is mongoDB (using mongoose). This is my User

Extracting embedded data from mongo object ( sub fields) in Talend

I'm working on Talend open studio for Big Data and connected to a MongoDB Database , however i can't extract complex subfields objects from my collections, some

Overwrite value and create key while update query in mongodb

I have a mongodb collection that looks like this: { "_id" : ObjectId("60471bd482c0da3c0e70d26f"), "owner" : "John", "propAvailable" : { "

Azure CosmosDB MongoDB Api GeoSpatial queries not working

I have CosmosDB MongoDB-API instance. Mongo server version = 4.0.0 Inserted documents look like: { "_id": "111", "fileName": "some.txt", "type": "

Parallel test execution and growing active connections to mongodb

I have an application with thousands of tests through MockMvc. The tests are running in band, so 1 at a time and whole process takes hours. I decided to try par

GridFS Large File Download Crashes the Node.js Server. MongoServerError: Sort exceeded memory limit of bytes

So I'm running a Node.js server with mongoose and I've been trying to download a large file using the GridFS node package but I've been getting the following er

Update objects with findOneAndUpdate by similar object value

I am trying to update documents values, if they already exist in a collection, if they have the same value for a specific object key. For example, I have the fo

MongoDB, get documents by a field, and mergeObject from another collections grouped count

Okay, the title is a bit too verbose and complicated but I have no idea how to put it any better. So here's what I have ModelA ModelB that has reference to Mode

how to search or find the data into array and also again into array mongodb

how to find the data into arrays of arrays. I want to find data that is stored in the array. When we got the data and send response with parent id. here schema

Mongod Active: Failed (code=exited, status=217/USER)

I am using ubuntu16.04 on VPS. It has been migrated to another company's VPS and is in use. nginix works fine and my node application works fine. When the mongo

Schema for saving a lot of questions MongoDb

If I have a survey application for child tracking what is the best way to save survey questions in MongoDB? Knowing that survey is divided into stages (about 12

why ejs displays file.forEach is not a function

I have the following error TypeError: C:\Users\USER PC\Documents\Prime_News_Hub\views\Top_Stories.ejs:27 25| 26| <% if(file){ %>

Mongoose data Writing issue in Javascript

Just started with a javascript couple of days back. I am trying to use MongoDB with mongoose to write the data but it is not writing even though the connection

How to fill missing field values with linear interpolation?

I have a collection of documents representing values at specific dates. Some of those dates don't have a value (the field can be missing or set to null). I'd li

Clojure - How to connect to MongoDB/DocumentDB via TLS Connection using Monger

I am not able to connect via TLS and monger to an AWS DocumentDB database. I downloaded the PEM file from AWS and added it to a new keystore file keytool -impor

is installing mongodb on cpanel reliable?

CPanel says that it does not support mongo installation but I can install it manually. My question is should I install it or just subscribe mongo atlas and conn

Get updated value from database

How do I watch for a specifc Mongodb-query? Currently I have tried with collection.watch(), but I am only getting the new value. An example: user1 = [user3, use

How to project only the fields present in an array in MongoDB?

there is a document schema that has an array field called "updatedFields" which contains some fields names that you will find in "oldDocument" and "newDocument"