Questions tagged as 'mongoose'

2
answers

How to recover all the GridFs files in MongoDB?

I have saved files in Mongodb using GridFs and C # but now I need to recover ALL the files I have saved in my database and store them in a folder. I hope you can advise me a little. Thanks This is the Code as I keep my files var connectionS...
asked by 22.11.2016 / 16:25
2
answers

Problem filling object with node and mongodb

I have the following function function getParadas(req,res){ var find; let paradas ={ paradasMetro:[], paradasCercanias:[], paradasBus:[] } var find1= ParadasMetro.find().sort('nombre_parada'); var find2= ParadasCercanias...
asked by 10.08.2017 / 20:44
2
answers

Mongoose relationships

How can I relate embedded collections? Example; suppose we have the collections A, B, C and that B is embedded in A, but in turn I want to relate B with C. 'use strict' /* Module dependencies */ import mongoose from 'mongoose' const Schema...
asked by 12.09.2016 / 17:20
2
answers

automatic consultations to mongodb once a month

I have to perform an operation for each document of a collection on a specific day of the month and save the results in other documents from different collections, my question would be which is the best way to do this, it would be with a bash sc...
asked by 27.12.2016 / 17:28
2
answers

Warning from Nodejs Mongoose

This warning appears on the console:    (node: 5627) DeprecationWarning: Mongoose: mpromise (mongoose's default promise library) is deprecated, plug in your own promise library instead: link I tried everything so that it does not appear...
asked by 16.07.2016 / 20:48
1
answer

The best way to consult a large amount of data with MongoDB

I have a 1.6GB collection that basically have 2 data: nombre and documento . The document has this structure: { "_id": ObjectId("5a6ba42850c4631898754a06"), "nombre": "Jorge", "documento": "4918273627" } I look for th...
asked by 07.02.2018 / 23:58
2
answers

Problems creating or updating records from array

I need help. I am setting up a system for loading notes per subject per student. I put together a spreadsheet to load these notes (angular) and once they finished loading, I sent all that object to be processed, but when I try to save those n...
asked by 01.03.2017 / 16:36
1
answer

Save and Actulize document arrays created dynamically

Good morning, I am working with mongodb and mongoose, and I have the following problem. I have a collection that is made up of a field, which must be an array ( yearsData that will be seen below) that will keep a record of other years, so...
asked by 16.11.2016 / 15:07
1
answer

I need help with a Query on a Backend- RestAPI of mongoDB using mongoose

This is the model of the object to which I ask the question const mongoose = require('mongoose'); const userSchema = mongoose.Schema({ _id: mongoose.Schema.Types.ObjectId, email: { type: String, required: true}, nombre: { type: String, requi...
asked by 24.06.2018 / 02:00
1
answer

How to perform an update with mongoose and nodejs?

I have the following code for an update, the problem is that I do not know if more than one field can be updated and if so, how would it be? Boleta.update({serie: serie}, {firma: parametros}, function (err, firma){ if (err) {...
asked by 02.02.2017 / 23:50