Questions tagged as 'mongodb'

1
answer

Inserting mongodb documents

I have the following document (Schema): var CandidatoSchema = new Schema ({ id_login: Schema.Types.ObjectId, nome: String, cpf: String, dataNascimento: Date, sexo: String, estadoCivil: String, endereco: { en...
asked by 02.04.2016 / 05:18
1
answer

Edit an element within an object, within an array, with Mongoose

I need a help! I'm new to Node.JS and I decided to "create a system" to put into practice what I already know and create challenges to encourage my learning! I did a beginner workshop (with Jean Carlo Suissa) that gave me a good foundation, but...
asked by 04.03.2015 / 02:21
1
answer

Installing MongoDB on another drive in Windows

I'm trying to install MongoDB on a drive other than "C". However when trying to use the "mongo" command in the terminal the following error is returned:    Failed to connect to localhost: 27017 The examples I encounter only talk about...
asked by 28.09.2014 / 14:28
1
answer

Error writing to MongoDB using Parallelism in C #

I have a collection in Mongo that has subdocuments, so I read xml files and write them to MongoDB. Each xml file is a document in Mongo. My classes public class Cabecalho { public Cabecalho() { Operacoes = new List<Operac...
asked by 04.09.2014 / 13:38
1
answer

MongoDB - Large collections of documents

I'm developing a site where users can vote for or against places they know. To do this I could create a collection called "votes" relating the location to the user and whether it was for or against, the problem is that this can generate a huge c...
asked by 08.01.2015 / 13:11
2
answers

How do I get a URL parameter in Express?

My URL is coming like this http://localhost:3000/menus/5.5 and it is bringing all the records of 5.5, but I would like the URL to be http://localhost:3000/menus?price=5.5 to have the same result, as you can see below; Thecodeth...
asked by 19.08.2018 / 10:39
1
answer

Mongodb Agregation + Lookup

Good evening, I need to relate two collections in mongodb, they are: db.markets db.products db.mercados.find() { "_id": ObjectId("5bb90160995e46f1fdbf1fe8"), "nome_mercado": "teste", "localidade": "são paulo", "pagamentos": [ "c...
asked by 07.10.2018 / 05:27
1
answer

How to add values by category?

I have some data structured like this: "_id" : "", "filmes" : [ { "nome" : "Filme 1", "categoria" : "terror", "qtd" : 7 }, { "nome" : "Filme 2", "categoria" : "comedia", "qtd" : 7...
asked by 23.01.2018 / 12:54
1
answer

Distinct and group in MongoDB

I have this query: db.getCollection('lojasDisponiveis').aggregate( [ { $group: { _id: { codigosLojas: "$codigosLojas", codigoUrl: "$codigoUrl" }}} ] ); The problem: For each store or group of stores, I have a code that goes into a u...
asked by 27.12.2017 / 14:58
1
answer

Relationship between documents - MONGODB

I have the following template: A schema called suspects, which has information from suspects. And other 3 so-called alerts, criminal actions and risky events. These 3 other schemas, should have the data of suspects, for example, the same suspect...
asked by 26.10.2017 / 15:47