Category "mongodb"

I need to apply a 24hour cooldown after use, and add to the token balance on a correct answer (discord.js v13)

Here is the challenge bot slash command: const { SlashCommandBuilder } = require('@discordjs/builders'); const { MessageEmbed, MessageAttachment

How to use MongoAuditting with MongoTemplate?

i'm trying to upsert using MongoTemplate. but auditting does not work.(@CreatedDate, @ModifiedDate fields didn't save) how to enable auditing with MongoTemplate

Property 'create' does not exist on type { new (fileBits: BlobPart[], fileName: string, options?: FilePropertyBag | undefined):File; prototype: File}

I'm trying to create a file-sharing app using Multer, Cloudinary, Typescript, and Mongoose. When I'm trying to save the files uploaded by users and the data lik

How to create nested array inside $group in MongoDB?

After some of the aggregation pipeline stages, my MongoDB Document has the following format: { "key": "A", "status": "To Do", "val": 4 }, {

Use Schema inside another Schema not working. Error: CastError: Cast to [ObjectId] failed for value

What I'm trying to achieve: Use one Schema (Ingredient Schema) inside another one (Recipe Schema). My goal is that in the Recipe Schema, my ingredients key to b

Class constructor NodeEnvironment cannot be invoked without ‘new’

At first I encountered this error: https://www.mongodb.com/community/forums/t/typeerror-class-constructor-nodeenvironment-cannot-be-invoked-without-new/151980 P

Remove specific object from array during aggregation

I have documents with the following structure: {field: ["id1", "id3"]}, {field: ["id2", "id1"]} To query the documents I use aggregate({$match: {'field' : { $i

How to dynamically delete MongoDB entry using API route

I would just like to simply delete a record from a dynamically displayed list. I've tried every permutation of the backend code and ai just can't get it to work

Security group inbound rules wiped out and added 0.0.0.0/0 by eksclusterrole automatically

I have deployed AWS EKS 2 node cluster(Version 1.18). It contains some ELBs, microservices and a UI hosted on Kubernetes. ELB's have their own security group. I

All nameservers failed to answer UDP port 53 Google cloud functions python 3.7 atlas mongodb

i can connect locally to my mongodb server with the address 0.0.0.0/0. However, when I deploy my code to the cloud I get the error deploy to google cloud functi

Mongodb plugin for cakephp 2.10 which will work on php7.4

my old application was on cakephp2.5 , php 5.6 mongodb ichikaway/cakephp-mongodb, i have updated it to cakephp2.10 and php7.4 but this plugin is not working as

Jave webflux process a String-response with id's

I've a reactive API which receives the following String (image below). I want to process these ID's and perform a search query to my MongoDB and return a Flux w

login with email or phone or username in node js

How can I login email or phone or username with password in node js and mongodb? user can login with email and password, username and password, phone and passwo

MongoDB: find duplicates across multiple keys

The documents are of the type { "id": 1, "sig1": "12345", "sig2": "67890", }, { "id": 2, "sig1": "67890", "sig2": "ABCDE", }, I would like to

Err:data and salt arguments required

connectde with datadase (mongodatabase) and chik if email == new email! and used bcrypt to do securty password. exports.createNewUser = (username, email, passwo

MongoDB Laravel works local but not on host

Would anyone know how to fix this I can't find any method that works online. My mongodb does work local but not on host. I'm using laravel with the following:

pymongo - "dnspython" module must be installed to use mongodb+srv:// URIs

I am trying to connect MongoDB from Atlas. My mongo uri is: mongodb+srv://abc:[email protected]/admin?retryWrites=True My pymongo version is 3.6.1 I h

Mongodb insert null date

Mail Schema: var mail = new mongoose.Schema({ globalId: {type: String, index: true, unique: true}, from: {type: String, required: true}, beginDate:

Renaming collection in MongoDB

I am trying to rename a collection in MongoDB. I accidently wrote db.currentName.renameCollection() but I should have wrote db.currentName.renameCollection(newN

MongoDB - Get latest non-null field value from documents with timestamp

In the MongoDB collection I'm querying, each document represents some data for a parcel at a specific time. Every time I receive an update for a parcel, some fi