mongodb Questions
6
There are a lot of errors in my application console.
How to fix it?
Next js 13.2 / app directory
Import trace for requested module:
./node_modules/@aws-sdk/util-user-agent-node/dist-cjs/is-crt-avai...
3
Solved
My schema is as follows : -
var Schema1 = new mongoose.Schema({
name: String,
description: String,
version: [{
id: String,
status: Number
}]
});
I want to unset the version field. I try th...
4
I am trying to run mongo:6 in docker container with docker compose file but it always gets exited with warning.
Docker version : 23.0.4, build f480fb1
Docker-compose version: v2.17.2
docker-com...
Fossilize asked 28/4, 2023 at 5:1
4
I am trying to run a docker instance and keep coming across this server.
Here is what I get after trying to setup the instance:
Starting instance ... done
Attaching to instance
instance | {"t&...
4
Solved
const generatedEvent = await Event.create(req.body);
res.send(generatedEvent);
I am getting some data from the request body and I can generate a new Event. And I'm returning the event to client...
4
Solved
My docker-compose:
version: "2"
services:
api:
build: .
ports:
- "3007:3007"
links:
- mongo
volumes:
- .:/opt/app
mongo:
image: mongo
volumes:
- /data/db:/data/db
ports:
- "27017:270...
Eringo asked 27/6, 2017 at 13:43
5
Solved
So I am using Prisma for the first time and my provider is mongodb and when I want to create a model it throws me an error
Invalid `prisma.user.create()` invocation:
Prisma needs to perform tran...
3
Solved
I am using the mongo-express.
Installed on AWS EC2, it was started.
$ node app
Mongo Express server listening on port 8081 at localhost
Database connected
Connecting to db...
Database db connecte...
Ofori asked 22/2, 2016 at 12:18
1
Is it possible to get the position of a document for a query?
Example:
db.users.find().sort({created:-1})
returns:
0: {name:"user1",created:5}
1: {name:"user1",created:4}
2: {name:"user1",creat...
Haugh asked 4/7, 2017 at 19:23
10
Solved
I am connecting to a MongoDB sharding server via mongodb java driver in Spring MVC. I am using the following versions:
spring-webmvc-3.2.1.RELEASE
mongo-java-driver/2.10.0/mongo-java-driver-2.10....
Meryl asked 24/10, 2013 at 2:45
2
Solved
I am looking to do the equivalent of $setIsSubset http://docs.mongodb.org/manual/reference/operator/aggregation/setIsSubset/ for regular (i.e. NOT aggregate) queries in MongoDB. How can I do this?
...
Gunilla asked 2/3, 2015 at 20:59
15
Solved
I'm learning Node.js and just started working with MongoDB.
I'm making a connection with the MongoDB Cluster I've created
const dbURI = 'mongodb+srv://testuser:[email protected]/mydb?retryWrit...
Assassinate asked 8/1, 2021 at 4:19
2
Solved
As far I know, currently MongoDB TTL are managed by expireAfterSeconds index and it's setting for all documents inside a collection.
Is there any built-in way to set expiration to single document?
...
2
Solved
Is it possible to enforce a field and have mongoDB always have a positive value for an integer field? It would be ideal if increment wouldn't make a number negative.
Beverly asked 22/4, 2016 at 1:20
5
I want to create a NestJs API with TypeORM and MongoDB. My entity id fields are of type ObjectID. The controller routes should validate the incoming ids before passing them to the services. I know ...
Dentiform asked 19/2, 2020 at 14:46
2
Solved
I am trying to connect to MongoDB v4.2.X using below command and getting the error.
FailedToParse: Password must be URL Encoded for mongodb:// URL: mongodb://user:user@123@localhost:27017/my-emp...
Miniver asked 15/5, 2020 at 16:49
3
I'm working on a MongoDB project for my school. I have a Collection of sentences, and I do a normal Text search to find the most similar sentence in the collection, this is based on the scoring.
...
Lelandleler asked 27/3, 2017 at 8:33
1
Solved
I'm getting the following random message on my Mongo Atlas "Access History" view:
"FAILED BadValue: SCRAM-SHA-256 authentication is disabled"
This message is attached to my appl...
Fulsome asked 28/9, 2022 at 1:1
2
I have a MongoDdb collection of about 10 billion documents. I want to be able to search in the collection using an $or query, but give priority over the conditions.
Here is my existing code:
const ...
6
I'm trying to hash passwords in an app I'm building and they are hashing fine when I create a user by calling this function(coffeesctipt):
UserSchema.pre 'save', (next) ->
user = this
hashPass...
3
I am creating passport authentication for node using mongoose. I don't have any collection called "users" in my database. But while creating new user using the schema like below
var mongoose = req...
Jerricajerrie asked 20/8, 2014 at 12:53
10
When I try to connect mongdb service i am getting error:
**
Windows could not start the MongoDB service on Local Computer
**
Error1053: the service did not respond to the start or control re...
10
Solved
We're designing an OLTP financial system. it should be able to support 10.000 transactions per second and have reporting features.
So we have come to the idea of using:
a NoSQL DB as our m...
1
Solved
MongoDB Aggregation - Find Documents within Specific Hour Range and Date
I have a MongoDB collection with documents containing an orderDate field of type ISODate. I want to find the documents where...
Stereograph asked 6/8 at 14:21
2
Solved
Does anyone know how to add an array element to a mongodb array and set a "virtual" order to the size of the array, all in an atomic operation?
So, something like:
db.users.updateOne(
{ ...
Anatropous asked 4/8 at 7:19
1 Next >
© 2022 - 2024 — McMap. All rights reserved.