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
votes0
answers128
viewsError while doing query
I am building a Rest api with Node, but when trying to get a pass parameters returns all the data. app js. const express = require('express'); const app = express(); const mongoose =…
-
0
votes1
answer403
viewsConsume API with Javascript and save data in Mongodb
Hello, Currently I have an application that Backend is in PHP and consumes a JSON API. Through the query I can save the data in my Mysql DB. I want to know if it is possible to do this in…
-
0
votes2
answers181
viewsMongoose error or nodejs
I’m developing a simple script, but I’m stuck in an error that I can’t understand the reason, I created a model and apparently the error occurs whenever I try to access. Node:…
-
0
votes1
answer435
viewsSearch mongodb by text?
I want to create a search in the items I am listing, I want to filter according to what user pass in a field type google.com click search and return the results that contain that text, but I want…
-
0
votes1
answer867
viewsHow to have more than one GET request?
I want to be able to fetch my items by name and this function is also a get request only it already has other requests Get wanted to understand how to get as many as I want I understand the program…
-
0
votes1
answer101
viewsAggregation with Mongodb and $lookup
Good morning, I’m trying to fetch data from two different collections with common values using Aggregate and lookup, but when executing the query it returns empty. I did it this way:…
mongodbasked 5 years, 6 months ago Ronaldo Lopes 453 -
0
votes1
answer127
viewsDeploy Heroku Error - Node.js
This is Galera, all right? So I’m deploying a Heroku app that had no connection to Mongo, it was online, but no connection to any database. I made the connection I tested the requisitions in…
-
0
votes1
answer37
viewsMongodb does not return query correctly
I have the following code: from pymongo import MongoClient class ConectaMongodb: def conecta(self): client = MongoClient('mongodb://localhost:27017') db = client.starwars_api return db def…
-
0
votes1
answer80
viewsManipulated image slide with database in Node.js
There’s this slide of images in bootstrap, I want it to receive the images from the database (so far so good), but instead of displaying one by one it’s listing all at the same time. that’s the…
-
0
votes1
answer608
viewsJest integration test - Nodejs API + Mongo
I would like a help in my tests, because I am doing something wrong because there is time that my test passes and soon after it does not pass more. Below are some of the two tests I have of my study…
-
0
votes1
answer54
viewsSearch and add table data in form [Nodejs and Mongodb]
I’m trying to load data from 3 tables into a form from routa, but it only takes the data from Municipality in the select of Country. It is supposed to have 3 selects (Country; Country; Municipality)…
-
0
votes1
answer686
viewsInsert value in the Mongoose array
My model works as follows. A user has documents, but the user registers before they have these documents. What I’m basically trying to do is to update users in the document array. SCHEMA 'user…
-
0
votes1
answer67
viewsMongo Query is not working when I have a compound property (one inside the other)
I am trying to perform a query in the database of Mongo, when I have a simple property as for example: Nome: João Works smoothly But if I have a compound property as an example: Tamanho: { PP: 2 M:…
-
0
votes1
answer29
viewsUpdate a user’s schema
Hello! Recently in Discord I made a system of clans, using mongodb atlas, to learn how it works. The problem is that it creates the schema in the right atlas, but gives the update in the user…
-
0
votes2
answers991
viewscheck if the email already exists
I created this function to check if an email already exists in DB let errors = []; function ValidationContract() { errors = []; } // verifica a validade do email e se o mesmo ja existe no banco…
-
0
votes0
answers47
viewsMongodb installation error
I’m having trouble in step 1: Importe a chave pública usada pelo sistema de gerenciamento de pacotes. When I execute the command: sudo apt-key adv --keyserver hkp: //keyserver.ubuntu.com: 80 --recv…
-
0
votes1
answer459
viewsHow to group data into an array, making a single object | MONGO + NODE
I would like to fetch user data along with their linked portfolios in an array, however, is bringing as two arrays. And inside each wallet has an array of "entrances" where you would like to bring…
-
0
votes0
answers56
viewsRelationship with Mongodb
I am using populate to create relationship with mongoDB, in case I have clients and projects, both belonging to the logged-in user, and being the project belonging to a client, my doubt is that to…
-
0
votes1
answer301
viewsReact: Javascript and Mongodb
I’m following a tutorial on how to make an instagram, has been done and tested the backend and frontend separately. In the backend I can change the routes and send/save information to Mongodb, in…
-
0
votes0
answers118
viewsAuto-fill inputs in the edit form with old data
Well, I’m using Node.js and Mongoose (mongoDB) as a framework for the database. On the front end I’m using handlebars. The problem is that the inputs are empty even passing as parameter the object.…
-
0
votes0
answers31
viewsRing query using Mongoose
Good morning, I need to carry out a query by changing the data of the object in Mongoose but I have not obtained success in finding the internal methods that do this and both $Facet and subpipeline…
-
0
votes1
answer278
viewsMongodb - Add documents that have a certain value within an array
Hello, thank you for your attention. If I have left any questions, please let me know. I found a problem that is driving me crazy. I have the following collection: { "_id":…
-
0
votes2
answers1659
viewsMongodb, mongod does not execute on cmd
I’m trying to run Mongodb 3.2 on a 32-bit Windows7 machine, but I’m having trouble running the command mongod in cmd, when I use the command it returns the following error:…
-
0
votes1
answer140
viewsLink data in Mongodb
Model const AvaliacaoShema = new Schema({ responsavel: { type: String, required: true }, time: { type: Schema.Types.ObjectId, ref: 'Time', required: true }, pergunta: [{ type: Schema.Types.ObjectId,…
-
0
votes1
answer39
viewsScroll on mongodb does not work
created 2 db and a user for each, but the user 2 can enter data in the database 1, what I am doing wrong use shop db.createUser({user: "appdev",pwd:"appdev", roles:["readWrite"]})…
-
0
votes1
answer162
viewsHow to log in with firebase and consume data from a local Rest api made with Node?
I have a React-Native application that consumes the data of an api made with Node and Mongo. And a simple application, is a CRUD of a "user" entity. However I have route protection using JWT in the…
-
0
votes1
answer309
viewsAdd images to mongodb via api using Postman
Good morning, I’m building an api on nodejs to access mongodb. I want to add images in this database and return the path of this image to my android application. I want to store the images directly…
-
0
votes1
answer69
viewsUpdate nested array in mongodb
Hello, I have been looking for a solution to my problem, which I will mention below, but I still haven’t found the right way to solve it, the solutions I find usually update the whole array rather…
-
0
votes1
answer38
viewsSending data via ajax generating new "_id" in Mongodb
I am sending information via ajax to the backend in Node to update a document in Mongodb, but whenever I send the form via frontend, it generates a new "_id" instead of searching for an existing one…
-
0
votes1
answer59
views"App Crashed" in Heroku log
I am having a problem with my Node application that is on the Heroku server. When I make many requests for the same route /oapi/login the application stops running, the error that the log returns is…
-
0
votes1
answer122
viewsRetrieving item from mongoDB array using C#
Good morning, I’m having trouble retrieving an array item within a Mongo document using C#. Below is an example of a document: {"_id":"5e1374ae38fa7026b88d4dc8", "Estacao":"NomeDaEstacao",…
-
0
votes1
answer70
viewsDelete element from string array in mongodb
Hello. I want to delete an element from a string array, in this case it is the Profiles array, which is present in the Person Document. This in an application developed in . net and with mongodb…
-
0
votes1
answer177
viewsAggregate array of two or more collections in mongodb
Hello, I have two Collections and want to query the two Collections, like the sql "Join". The relation between the Collections is made as follows: medico: [{ medicoId: { type:…
-
0
votes0
answers24
viewsHow to use the mongodb-stitch-browser-sdk Stitchappclientconfiguration in browser Javascript?
I tried to use the code to inform localAppNamelocal and localAppVersion in Javascript, but I can’t find any clear examples on the web. Someone with knowledge about Stitch can show us the right one?…
-
0
votes2
answers72
viewsMongoose’s Findone method is running in infinite loop
I have the following problem. I have a Findone method to search if a user exists in the database, according to the user and password. But when I run the method - using Inuit, it ends up in an…
-
0
votes1
answer58
viewsCreating a like with Node.js and mongodb
I’m creating a like where the action can be done only once per person, I perform the action with the user X the first time and it works and if he tries again he can’t, but when someone else gives…
-
0
votes0
answers54
viewsanswer with empty mongodb + vuejs array
I am doing the front of a very silly application just to train,the backend is all done and running right tested several times with insomnia,so now on the front I can’t get the data in the database…
-
0
votes0
answers30
viewsObject attribute can be filled with function call? Javascript
I’m trying to turn a file. js in module so I can access it in another .js. So this file I want to export needs to be it integer an object, right? Example: File "database" module.exports = {…
-
0
votes2
answers70
viewsWhich files should be ignored by Git in a Mongodb database?
I am creating an application with Mongodb and after initializing the repository, I entered the command git add * in the root directory of my project. When I went to upload the repository to Github,…
-
0
votes1
answer323
viewsHow to pass several parameters to query in Mongoose?
I want to do a Mongodb search with Mongoose (Nodejs), where I want the objects whose url attribute that is a string contains within it at least 1 of the values I have in an array. How could I do…
-
0
votes2
answers154
viewsPromise async/await not resolved
I am doing . map() in an array, to do a Mongoose/Mongodb query with each element of this array and returns another array with the results. However, after this process, I try to access the new array…
-
0
votes1
answer181
views.find() from Mongoose returns nothing when it should
I’m trying to make an appointment with Mongodb with Mongoose. The parameter is a $in with an array whose only value is a regular expression that selects the object if the attribute "url" has the…
-
0
votes1
answer65
viewsHow . populate searches the data
I have a question about performance using Mongoose. Suppose the following models: const Disciplina = new Schema({ titulo: { type: String, } }) const Assunto = new Schema({ disciplina: { type:…
-
0
votes1
answer24
viewsPerform an update on Mongo DB grouped fields
I have a Node application that connects to Mongodb, in it I have an endpoint using express that returns me the largest balances grouped by agency: router.get("/private", async (_, res) => { try {…
-
0
votes1
answer44
viewsMongodb.Drive fails to filter an Object Array with Elemmatch
I have a document in mongoDB with this training: { "_id" : NumberLong(21), "_t" : "Detail", "DeletionDate" : null, "CreationDate" : null, "UpdateDate" : null, "Accounts" : [ { "Bank" : "123",…
-
0
votes1
answer601
viewsHow to save a json object to mongodb, which is the answer to an API post
I need to save a certain field,from a json object,which comes from the response of an API I called. Save some fields of this response json object,in some fields of my colletion/model on Mongodb also…
-
0
votes2
answers368
viewsHow to take data from a specific field in an XML,with Nodejs,and then save it in the Mongo database
In an API response, it brings me an XML, but I need to capture just a few specific fields and save it in my database Mongodb with the package Mongoose,using Nodejs and Axios. My XML response comes…
-
0
votes0
answers38
viewsMongodb query optimization for large collection with large documents
I am using Pymongo with Flask and would like to know how to optimize a query as I am filtering within a large collection (2947 documents) with large documents. This is the structure of the…
-
0
votes0
answers7
viewsSystem.Nullreferenceexception: 'Undefined object reference for an instance of an object. ' Mongo was null
I need to make a confirmation in the code, where the client inserts the cnpj and if it is already in the database, it will be possible to continue the registration, otherwise the code will be…
-
0
votes0
answers56
viewsHow can I compare two or more values using the match function in Kotlin
I’m using Kotlin with Mongo and have the following code snippet: match(equal(Industry::addresses, Address::category, value = AddressCategory.MAIN.toString())!!) The category of this address can be…