Questions tagged as 'mongodb'

0
answers

Create an event that performs cleaning task in mongodb

I am new to mongodb and I was looking for the possibility of creating a function that runs every so often in mongodb but I have not achieved something like this: setTimeOut(function () { db.getCollection('events').findAndModify({"query":{"st...
asked by 23.02.2018 / 18:00
1
answer

PassportJS + Express with Node.js, req.session.passport Undefined

I am new with this framework and I was trying to do a 'Registration and Login' test with PassportJS + Express + Node.js + MongoDB and Redis. The registry works perfectly and apparently the login also, the problem is that when logging in I want t...
asked by 21.02.2018 / 05:05
0
answers

Walking branches in MongoDB

I wanted to create a query that took the "price" attribute of a series of objects of the type shown below. The problem is that the branch "prices.2018.02.13.20180205210908_223.price" is not fixed, but the part " 2018.02.13.20180205210908_223 "It...
asked by 19.02.2018 / 12:49
0
answers

Consultation Mongo ForEach

I was trying to get a query that for each zip code gives me back the sum of all the accommodations in that area and I'm stuck at this point. The result of above are the different postal codes and the one below the sum of the prices of t...
asked by 19.02.2018 / 08:47
0
answers

MongoDB Remote Access

I have installed a MongoDB in OpenSUSE version 42.3. The version of MongoDB is: MongoDB shell version v3.4.10 In the file: /etc/mongodb.conf I have this configuration: # What type of connections to allow. net: po...
asked by 18.02.2018 / 16:58
0
answers

how can I make a $ pull on a sub-element of an array in mongodb

Good morning I want to do a pull in a mongodb arrangement, like the next one { _id:ObjectId(123456789), elementos:[ { name:"x", items:[ { _id:ObjectId(123456788),...
asked by 13.02.2018 / 14:34
1
answer

How to export database made in Mongodb to VPS in digital ocean?

I have a problem with the export of the database, I have been developing a system (MEAN), and we have used it in an intranet, everything perfect up there, Now we are hiring a VPS and almost everything is already configured, except the database,...
asked by 01.02.2018 / 14:12
1
answer

How to prevent mongo from returning a list of an item by using $ first

How can I avoid that in the following query, the price fields are not arrays? db.products.aggregate( // Pipeline [ // Stage 1 { $match: { "Disabled": false,"AvailabilityPercentage": {"$gt": 0} } }, //...
asked by 01.02.2018 / 18:22
1
answer

Download a mongo model with NodeJS

I have a Mongo database and I would like, through an API in Node, to be able to download these records in zip, in a CSV or whatever format. Right now I have 501426 records so the find of the model gives me the following error when getting all th...
asked by 15.01.2018 / 16:40
1
answer

Test fongo error in com.fasterxml.jackson.databind.JsonMappingException

I'm trying to perform a test through phon but I get the error:    com.fasterxml.jackson.databind.JsonMappingException: Can not   deserialize instance of com.formacion.pem.userProyect.User out of   START_ARRAY token at [Source:   [{"id": 1, "c...
asked by 27.12.2017 / 16:34