Questions tagged as 'mongodb'

0
answers

How popular a sub list of a document with mongoose?

Is it possible to populate a list that references another list in the same document? Example in the image below, I want to popular / return in a search always the access link referring to another list of links that has all the information. This...
asked by 07.11.2017 / 14:50
1
answer

Docker-compose Spring boo and MongoDB: Connection Refused

I'm studying docker, and I'm trying to run a small application made in Springboot along with Mongodb in a single container. I wrote the following Dockerfile: FROM openjdk:8-jre-alpine ENV SPRING_OUTPUT_ANSI_ENABLED=ALWAYS \ JAVA_OPTS="" A...
asked by 06.11.2017 / 21:38
1
answer

List items of an object in the JS Pug, with Node and Mongo

I'm setting up a store, using Keystone JS, I installed the Pug JS and MongoDB dependencies. I created a model that is pointing to a view, called Tour.JS The problem is that I could not efficiently list all the items that are in the MongoDB...
asked by 01.11.2017 / 03:19
0
answers

How to create a view whose filter is based on the date / time of the query?

In the collection documents lightningStrikes there is a datetime property whose value is of type ISODate. There are several new documents in this collection every minute. My goal is to create a view that always returns the data for the la...
asked by 28.09.2017 / 21:57
1
answer

Remove all array from result aggregate mongodb

I have the following total array I need to pick only those that have date. { "_id" : ObjectId("58862a838f3e2721f8d920cc"), "total" : [ [], [], [ ISODate("2017-09-07T00:00:00.000Z") ], [], [], [],...
asked by 28.09.2017 / 21:18
0
answers

Aggregate in C # does not return anything?

I made a direct query on the console that returned what I expected, the query on the mongo is like this. db.AtividadeResultMongo.aggregate([{$unwind: "$LsVariaveisProcesso"}, {$match: { IdAtividade : 913, IdEstadoInstanciaA...
asked by 01.09.2017 / 23:26
1
answer

Register unique embedded documents

I want to add an embedded document, I am using $push of update, in schema I put the attribute as index: { unique : true } , but not respecting the rule this is registering item as the same name Can anyone help me? var funcionar...
asked by 25.07.2017 / 21:46
0
answers

Changes do not take effect when I change Schema, using mongodb and nodejs

Whenever I make a change in my Schema I have to restart my mongo server or node for the changes to take effect. I'm using the nodemon, but it does not always update, has anyone ever had it? module.exports = function(app){ var Schema = r...
asked by 25.07.2017 / 14:46
0
answers

Node.js passport.authenticate is not a function, how do I solve this?

As requested, I narrowed down the codes a little and kept only the essentials that I believe were involved with the problem. Reformulating my question: I have a simple register in a modal (only name, email, phone and password) I can navigate the...
asked by 13.07.2017 / 21:11
0
answers

Optimization with MongoDB

I'm starting with MongoDB and I'm having a question about optimization. COLLECTION BOLAO: [ campeonato : 'Brasil - Série A', confrontos : [ { id : 10, casa : "Sport", visitante : "Chapecoense", horario : "2017-07-20 11:00:00" } ]...
asked by 18.07.2017 / 00:49