skip to Main Content

Update element of an array if and only if data for element is present in new document mongodb

I have a problem while updating an array. sample document : _id:11, marksObtained:[{physics:10}, {chemistry:12}, {maths: 11}, {biology:9}, {social:9}] name:"Someone" field to update is: [{chemistry:13},{zoology:12}] So the new document looks like: _id:11, marksObtained:[{physics:10}, {chemistry:13}, {maths: 11}, {biology:9}, {social:9},{zoology:12}] name:"Someone" marks in…

VIEW QUESTION

`mongosh` cannot connect to MongoDB TLS cluster but `mongo` can — MongoServerSelectionError: Hostname/IP does not match certificate's altnames – Ubuntu

Metadata Versions: Ubuntu focal MongoDB 5.0.14 mongod started with args: /usr/bin/mongod --bind_ip_all --replSet=mongodb --auth --tlsCAFile=/etc/mongodb/external-ca.crt --tlsCertificateKeyFile=/etc/mongodb/external-cert.pem --tlsMode=preferTLS --clusterAuthMode=x509 --tlsAllowInvalidCertificates --tlsClusterCAFile=/etc/mongodb/internal-ca.crt --tlsClusterFile=/etc/mongodb/internal-cert.pem Problem Problem: Cannot connect to replica set with TLS enabled via mongosh I have TLS enabled on a replica…

VIEW QUESTION

What does 'dbo' stands for in MongoDB – Express app?

Here is the code example: app.js const express = require("express"); const app = express(); const cors = require("cors"); require("dotenv").config({ path: "./config.env" }); const port = process.env.PORT || 5000; app.use(cors()); app.use(express.json()); app.use(require("./routes/record")); // get driver connection const dbo = require("./db/conn"); app.listen(port,…

VIEW QUESTION

i got a problem when im connecting to mongodb

Terminal [nodemon] app crashed - waiting for file changes before starting... [nodemon] restarting due to changes... [nodemon] starting `node index.js` (node:16036) [MONGOOSE] DeprecationWarning: Mongoose: the `strictQuery` option will be switched back to `false` by default in Mongoose 7. Use `mongoose.set('strictQuery',…

VIEW QUESTION
Back To Top
Search