Most voted "mongodb" questions
Use this tag when the question refers to a resource, information, or problem that relates exclusively to the Nosql Mongodb database. Mongodb is a scalable, open source, high-performance, schematic, and document-oriented database that supports a large number of application development languages and platforms. Mongodb is recognized as the main Nosql database.
Learn more…587 questions
Sort by count of
-
0
votes1
answer788
viewsUnhandledpromiserejectionwarning: I believe it is after mongodb research
I believe that this problem is in this part of the code, funny that below used a code very similar but does not give the error: UNSOnline.post('/resetpass', (req, res) => {…
-
0
votes1
answer166
viewsI am unable to edit in CRUD - Nodejs + Express + Mongodb
next: I literally started working with Nodejs + Express + Mongodb today and as an exercise I started with the famous CRUD (Create, Read, Update, Delete). I managed to do almost everything except the…
-
0
votes1
answer24
viewsWhat is a Distributed Cluster?
I am studying about database, specifically the mongoDB. So in the face of my ignorance, I would like to know what that expression, cluster distribuído or consulta em cluster distribuído, means.…
-
0
votes0
answers456
viewsImage storage in mongodb
I’m developing a mobile app in React where there will be several profiles, with up to 5 photos each. Our api is currently in aspnet core 2.0 and we use mongodb as a database. My question is this,…
-
0
votes2
answers652
viewsConvert SQL query to Mongodb
I have little (or no) knowledge in non-relational banks. I need to convert the below query (Sqlite) into an equivalent query to be executed in Mongodb. SELECT COUNT(*) FROM match_table WHERE…
-
0
votes1
answer26
viewsMongodb Insert Error
I did that: MongoDB Enterprise>db.Channels.insert({ ... "ChannelCode" : "BT" ... "Name" : "Bartira" ... "Celphone" : "(11)971418418" ... "Endpoint" : "www.bartira.com.br" ... "TokenLogin" :…
-
0
votes1
answer40
viewsError to use mongodb filter
I have an error trying to run a filter in the database. var params = '{"cd_entidade":"'+ vcd_entidade+'"}'; Movmaterial.find(params).toArray(function(err,docs){ if (err) throw err;…
-
0
votes1
answer70
viewsimport a mongodb tuple
Hello, I’m importing a collection of documents from mongodb, I’m importing from a csv file, I’m having trouble importing key pairs:value, mongodb is recognizing everything as string, example: I want…
mongodbasked 7 years, 5 months ago Carlos Andre 111 -
0
votes0
answers303
viewsInstallation of Mongodb in Debian
I am trying to run Mongodb on Debian Jessie and apparently install everything correctly, but when I run it gives errors as indicated below. I don’t know if it’s relevant either, but following the…
-
0
votes1
answer72
viewsJavascript - Compare input field to mongodb field
Can anyone give me information about this? I’m trying to learn or else demonstration with explanation What I want to do is to have html input and fetch the value of this input check if it exists in…
-
0
votes2
answers3010
viewsMongodb connection with nodejs
How do I connect to the Mongo database with nodejs? I’ve looked at several sites but I’m not getting it right! I thank those who help!
-
0
votes0
answers98
viewsUsing two connections with Mongodb using Mongoose with references to distinct collections
I have two Mongodb databases that I connect using Mongoose on Nodejs, one with an X collection that references the ID of another Y collection that is in another Mongodb database on another server. I…
-
0
votes1
answer175
viewsPHP + Mongo: Cannot create SSL client
How do I connect to a Mongo+SRV DB $manager = new MongoDB\Driver\Manager('mongodb+srv://username:[email protected]'); Error: Fatal error: Uncaught Exception 'Mongodb Driver…
-
0
votes1
answer28
viewsNested Documents
I have a question that I believe is basic for those who are starting with nosql and comes from the classic relational structures. Well, let’s look at a simple example for relational structures: I…
-
0
votes2
answers979
viewsRemove an object within a mongodb array
I have the following document inside a Collection in mongodb: { "_id" : ObjectId("5988efbb742568478c6a086f"), "cliente" : "[email protected]", "lista_compras" : [ { "id_produto" :…
-
0
votes0
answers79
viewsHow to use save on Node js?
I’m with a study project using Node JS with Mongodb and I’m having difficulty saving a record in the database, I’m using the method this way. function postRestaurant (req, res) { var restaurants =…
-
0
votes2
answers708
viewssort numerical data mongodb
I am trying to sort numeric data with a field set as number in Collection and the sort does not present as I need. Example: 1,2,3,10 after sorting the displayed result: 1,10,2,3. How to modify the…
mongodbasked 6 years, 3 months ago Gerci Lisboa 1 -
0
votes1
answer58
viewsCreate different indexes for different searches - Mongodb
Hello, At another time I needed to get posts similar to a specific blog I’m developing, and this similarity was governed by the tags used in each post. Using Mongodb, I achieved this by creating an…
-
0
votes1
answer646
viewsHow to search for Id in mongodb
How to search in Mongo with condition parameters, type: Collection.find({userId}, {done: true}).fetch(); This way I wrote I want to return all the documents that have the done true, doing a search…
-
0
votes1
answer96
viewsCreate Mongodb database and user via shell
I need to create database and Mongodb user, but all via shell. I found something about --Eval and --shell, but I couldn’t make it work, I’m trying it that way: mongo mongodb://11.11.123.321:27017…
-
0
votes1
answer124
viewsSQL Server vs Mongodb - Disk Size
Today I have a table in SQL Server very large and receives data all the time referring to some factory machine. This is causing a problem of large disk consumption, table size keeps increasing. If I…
-
0
votes1
answer578
viewsCompare two object arrays?
I need to compare 2 arrays in Javascript, one that returns from a Mongodb query and the other comes from the email provider. The two comparison criteria are the email ID and the box to which it…
-
0
votes3
answers55
viewsInstalar Mongodb
I’ve asked before but I couldn’t solve it, I took some time, I tried again and I’m still having trouble starting Mongodb. I removed it from my Ubuntu 18.04 computer and am installing again based on…
-
0
votes1
answer291
viewsNode.js - Aggregate returns object
I am doing locally the Node.js exercise as Mongodb proposed in https://www.w3schools.com/nodejs/nodejs_mongodb_join.asp There are two collections, Orders and product. After aggregation, the expected…
-
0
votes1
answer32
viewsHow to assemble an object?
I’d like the key and the value cotação and modalidade of the collection confronto remain in their respective objects whose id is the same in the collection palpites. How can I do that? [{ "_id":…
mongodbasked 7 years, 2 months ago wedson santos 81 -
0
votes1
answer123
viewsError in Mongodb/Mongoose?
I am trying to start my server, however while trying to start it accuses error in Mongodb, and I have been for hours looking for the solution to this problem and so far found nothing. What’s even…
-
0
votes1
answer88
viewsRank system using Mongodb
I’m having a hard time using the aggregate of Mongodb. I need to pick up 5 users who collected more items. username: 'gg_Max', items: [ { encrypt: "WccmGN3k6vpbfcdVuWmhTT", results: { collected: […
-
0
votes1
answer311
viewsMongoose Nodejs: error when connecting with Mongodb
I am trying to connect to the Mongodb database but the following error occurs: My code: when I run the mongod server command: If anyone can help me find a solution, I’d be grateful…
-
0
votes0
answers20
viewsHow to remove mongodb.so from PHP
Some time ago I installed Mongo DB on a virtual machine to test. I also installed the PHP library for database manipulation. So far so good. It turns out that after that I can no longer use…
-
0
votes2
answers104
viewsDisable/delete Docker container marked with Restart: Always
I started a service on Docker with the image of the db icon, follow Docker: version: "3.1" services: mongo: image: 'mongo' container_name: mongoapp restart: always image: mongo volumes: -…
-
0
votes1
answer34
viewsTwo query operations on a Collection
I’m new to Node JS and mongoDB and I’m trying to run a find and then a update, but it doesn’t seem to be possible. Someone has an idea? function CarrinhoDAO(conexao) { this._conexao = conexao(); }…
-
0
votes1
answer1654
viewsWhat is the function of the populate method in Mongoose?
I am doubtful to understand the functionality of the populate method in Mongoose
-
0
votes1
answer771
viewsMongodb queries using like and disregarding accents and case
I would like to know how I can make queries in mongodb when I can consult in any position of the string (Like), but it would also be necessary to disregard special characters such as accents. I was…
-
0
votes0
answers230
viewsPool server connections for web application
would like to know if it is possible to implement a pool of connections on a server and have it distribute the connections to java desktop applications, if possible would like a direction of what to…
-
0
votes1
answer325
viewsSort a list of objects by a string list
I’d like to serve Getall already brought the list of posts in order according to the list of Ids passed by the parameter module. Higlights List<Post> posts = new List<Post>(); var posts…
-
0
votes1
answer73
viewsPrimary Key: Hashmap or Common Object?
Good afternoon guys, all right? My question is this... I want to use Hashmap as the primary key. Is there a problem? Or should I use Object? NOTE: I am modeling the database, which will be with…
-
0
votes1
answer110
viewsfind no req.body using populate
Controller async index(req, res) { const avali = await Avaliacao.find(req.body) .populate('Time').exec((time, err) => { console.log(`Para retorna tudo ${time}`) }) return res.send(avali) }, Model…
-
0
votes0
answers36
viewsConnect to Mongodb with Token
My current connection file is this: const mongoose = require('mongoose') mongoose.connect('connect string url', { useNewUrlParser: true }) mongoose.Promise = global.Promise module.exports = mongoose…
-
0
votes1
answer260
viewsProblem with Success message after registration of 2 inputs in the bank!
Hello, I have a problem in my code, after registering 2 inputs should appear a message of success in uam green div, but only appears the green div and the message no, already revised the code…
-
0
votes1
answer54
viewsI can’t create a user in Mongo from Docker
I’m executing the command: mongo exec -it mongodb mongo --host localhost -u admin -p 3613 --authenticationDatabase admin --eval "db.getSiblingDB('testando').createUser({user: 'spirit', pw: '3613',…
-
0
votes1
answer72
viewsIs there any other way to run my mongodb other than by Docker?
Recently, I started with a project that uses mongodb, monitored by Robo3t, but when I look for information on the Internet on how to run it, explanations only appear using Docker. My computer is 32…
-
0
votes1
answer45
viewsMongo driver for php only works with mpm_prefork?
Seeking a better performance for my application I changed the MPM of apache of prefork for event, but when restarting apache with the new processing module the mongodb does not work, while accessing…
-
0
votes1
answer279
viewsReturn total documents from a Mongodb Collection?
I made a api in C# and it’s the first time I’ve used Mongo as a bank and on a route I need to get the total records I have on my Collection. I tried several ways but could not find a way to return a…
-
0
votes0
answers551
viewsInsertion error: this. _Connection is not a Function
I am trying to make an insertion in the database using nodejs and mongodb, but I get the following error: TypeError: this._connection.open is not a function at UsuariosDAO.inserirUsuario…
-
0
votes0
answers94
viewsProblem running a Spring project with Mongodb
Hello, yesterday before giving a commit on the project I tested, and it worked normally. Today when I turned on the PC and tried to test it my sping was not initialized. Can you help me identify…
-
0
votes1
answer180
viewsMongoerror: Unknown top level Operator: $expr
I’m trying to do this in my code and works perfectly on the localhost but on the Umbler server is giving error. FOLLOWS THE ERROR: MongoError: unknown top level operator: $expr Follow the code I’m…
-
0
votes1
answer118
viewsMongo indexes
I am starting the studies with the indexes. I have a base in Mongodb where the documents have about 10 fields. Searches can be done using all these variables. I created an index with all fields, and…
-
0
votes1
answer135
viewsMethod of depreciated Mongoosis
I’m trying to make a connection with mblab but the connection method is deprecated. Version of the method is 4.9.7. What I need is 4.13.7. Structure: server.js const express = require('express');…
-
0
votes0
answers17
viewsConnection timed out
hello, I am studying about mongodb and I am trying to connect in the cluster I created, using Compass, but this giving the following error: Connection timed out I downloaded the Compass on another…
-
0
votes1
answer66
viewssynchronize nosql and relational databases
I have an Asp.net application that uses the CQRS architecture standard and two databases one relational with Entity framework and one with mongodb. The question is at the end of the day, or in parts…