29,553 questions with no answers
1
vote
0
answers
111
views
Mongoose.js nested object query
This is simple but I'm slowly falling into madness, I got existing JSON imported to mongoDB:
{
"_id": {
"$oid": "5611acaca5ea5f7c5d1a1f41"
},
"...
0
votes
0
answers
41
views
MongoDb connection limit
I am running a MongoDb atlas M20 instance which should have a maximum of 1500 connections in its pool. It has 1 primary and two secondaries. If I look at the server stats I can see the connections are ...
0
votes
0
answers
52
views
MongoDB Atlas Timeout After Deployment Update — "ReplicaSetNoPrimary"
I updated my backend deployment (Flask app) with a new feature not related to database logic, and suddenly MongoDB Atlas connections no longer work. Before the update, everything was fine.
Local ...
0
votes
0
answers
25
views
$vectorSearch pre filter by non existent properties
When using the $vectorSearch aggregation stage and specifying filter, using the $exists operator isn't supported, but another way of effectively doing the same thing is to check if the property value ...
1
vote
0
answers
608
views
Mongodb - promoting data from staging to prod environment
I have prod and staging environments for Mongodb. I have good amount of data entered it staging environment for every release which will go through testing process. Once the testing is done, I would ...
0
votes
0
answers
53
views
Mongock rollback method is not executed
I have a collection migrationTest in MongoDB with a unique index for the message field.
In my migration I'm inserting documents to this collection and in one place I'm using the existing message to ...
3
votes
0
answers
103
views
Azure Cosmos: MongoDB sharded cluster: $in query performance degrades with fewer values
I'm facing a counter-intuitive performance issue with my MongoDB sharded cluster where queries with fewer values in an $in clause are significantly slower than queries with more values.
The Issue:
...
0
votes
0
answers
61
views
NestJS converting mongodb snake case to camel case format but it returns undefined
I'm currently trying to create the model using nestjs mongoose schema, and i want to convert the mongodb data from snake case to camel case in my schema layer like this:
export type ...
0
votes
0
answers
76
views
How to deserialize polymorphic objects in MongoDB?
I am developing a project using Kotlin and the Quarkus framework (version 3.20 LTS), that connects to a MongoDB database, which has already been populated previously with some documents using the ...
1
vote
0
answers
37
views
MongoListener (Java) not reading from MongoDB collection on local Docker
I have a MongoDB Docker container, running locally. I have set this up using the following file, docker-compose.yml
services:
mongodb:
container_name: mongodb-local
image: mongo:latest
...
0
votes
0
answers
32
views
The Confluent Kafka Connector is not creating a topic to produce the payload
I'm using Confluent’s Kafka Connect MongoDB Source Connector in a Docker Compose environment. I expect the connector to create an output topic based on my configuration, but it isn’t creating any new ...
1
vote
0
answers
45
views
Where should I put my MongoDB connection string in Vue CLI project?
I am learning to build an MEVN project. I have a MongoDB connection string that looks like this "mongodb+srv://<username>:<password>@<clustername>.abcdefg.mongodb.net/?...
0
votes
0
answers
47
views
Getting Undefined in body while hitting post request through postman
import { DBCon } from "./db/index.js";
import express from "express";
const app = express();
app.use(express.json());
app.use(express.urlencoded({ extended: true }));
DBCon()
....
2
votes
0
answers
71
views
MongoDB error: No suitable servers found (`serverSelectionTryOnce` set): [socket timeout calling hello on 'localhost:27017']. Topology type: Single
So I have a dockerized mongodb.
My docker-composer.yml code is:
mongodb:
image: mongo:latest
container_name: mongodb
restart: unless-stopped
environment:
...
0
votes
0
answers
69
views
ValidationError: MyModelSchema validation failed: items.0: Cannot read properties of undefined (reading 'model')
I am working on migrating the project to a new version. Stack: express 5, mongoose 8, typescript 5.8, typegoose 12
I looked for more information and would now like to clarify the cause of the problem:...
0
votes
0
answers
68
views
Mongodb $push $each onto array is resetting createdAt date for all subdocuments
Hopefully this makes sense. Using mongoose to push new items into an array of subdocuments, the documents get added fine, however on certain (random) occasions, the createdAt date of the current ...
1
vote
0
answers
371
views
Made a CRUD class, then create a Python testing script in Jupyter Notebooks that imports my CRUD Python class to test CRUD functionality
I don't think it's a server issue but I tried fixing server timing, I don't know where else to turn to at this point. I tried every option and stack overflow is my last option. Point out what I am ...
1
vote
0
answers
63
views
Disabling allowConnectionsWithoutCertificates when using requireTLS in MongoDB Community Operator (v0.13.0)
I’m deploying a MongoDB ReplicaSet using the MongoDB Community Operator v0.13.0 (Helm chart). I want to enforce mutual TLS so that clients must present a valid certificate signed by my CA. Based off ...
2
votes
0
answers
133
views
MongoDB Atlas connection error: queryTxt ETIMEOUT with Mongoose
Mongoose connection to MongoDB Atlas fails with queryTxt ETIMEOUT
I’m trying to connect my Node.js app to MongoDB Atlas using Mongoose, but the connection fails with a timeout error.
Here’s the error ...
1
vote
0
answers
131
views
How to read data from MongoDB collection using SparkSession into a Spark DataFrameReader?
Spark reading data from MongoDB(ver 7.0) and DocumentDB(ver 4.0) and loading into the spark DataFrameReader is failing when DataFrameReader.isEmpty() method is called . SparkSession and ...
0
votes
0
answers
110
views
Trying to pass UserID to API through form. The ID is retrieved, but doesn't seem to be passed
I'm making an event management application. I'm using better-auth & mongodb. I got a form in which I can create an event. Now, alongside the event name, and dates I want to pass along the owner's ...
1
vote
0
answers
773
views
How to post file and data with AngularJS with MEAN stack
I went through hundreds of pages for several days without success and here is my problem.
I use the MEAN stack and at this point I have a simple form that works very well to save a "name" ...
0
votes
0
answers
46
views
Using JWT for Identity Auth in MongoDB
I am running into an issue with trying to use .NET Identity with a MongoDB backend. The problem is related to authorization. I want the API to use JWT but it would seem the package I am using defaults ...
0
votes
0
answers
40
views
Combine autocomplete and text search into single index definition
Suppose that I have the below simplified schema:
const Venue = new mongoose.Schema(
{
name: {
en: { type: String, required: true }, // English translation
fr: { type: String, ...
0
votes
0
answers
177
views
.NET Sporadic FormatException: Cannot deserialize a 'String' from BsonType 'ObjectId'
Since upgrading to .NET 6 to .NET 8, we are getting very unusual and sporadic behaviour from MongoDB (driver?). Every couple of days (sometimes weeks) the driver would start throwing the following ...