Questions tagged as 'mongoose'

0
answers

Display data in an html of a mongo database and generate a statistics

Very nice people ... I am with a small problem in which I am breaking my head ... I am working with node.js and mongodb ... I have a table with several records with different ids ie each record has its id own in which it is already assigned as a...
asked by 14.09.2018 / 02:22
0
answers

How to make a trigger (trigger) in mongodb?

What I want is to make a record of all the movements made in the database, for this I plan to use a table blog which has the following structure: bitacora = { _id, action: String, userId: String, create_at:{ type: Date, defau...
asked by 28.08.2018 / 09:25
1
answer

Only get populate data on mongoose

I'm just trying to get data from a mongo query but I just need what the populate brings in an object, these are my models: In this I have a collection of services (services): var categoriesSchema = new Schema ({ _id: { type: String, req...
asked by 24.08.2018 / 14:29
0
answers

How to show different content to each user of my web app? MERN stack

I'm trying to make a voting app where you can only vote once, for this I collect the ip of the users who vote and then compare these saved ip with the one of who is using the app (to know if I already perform your vote) and so show him one thing...
asked by 22.08.2018 / 19:58
0
answers

How to search within a document with stored ID?

I have this document: { "_id" : ObjectId("5b774ebd88bff63a48a4019c"), "modelo" : ObjectId("5b774ebc88bff63a48a40198"), "tamano" : ObjectId("5b774ebc88bff63a48a40199"), "color" : ObjectId("5b774ebc88bff63a48a40196"), "termin...
asked by 18.08.2018 / 17:16
0
answers

Why do I get this error? Cast to ObjectId failed

I am working with MongoDB and made this a%% share% correctly with and I get this result: { "ok": true, "mensaje": "Petición realizada correctamente", "folios": [ { "folioLineas": [ {...
asked by 08.08.2018 / 19:43
0
answers

xmpp http-bind, server restart?

Every time the client wants to enter the server, I have to restart the server, this is in a local network. log > SENT X <body rid='1504425261' xmlns='http://jabber.org/protocol/httpbind' to='im.rtedesw29.com' xml:l...
asked by 09.08.2018 / 18:17
0
answers

iterate array that is in array and that array in an object

How to make a map on an array of arrays and then filter, I have a mongoose model in which there is an array of objectId and I need to make a filter but being an array array I first made a map and then a filter and not it works for me con...
asked by 03.08.2018 / 17:34
0
answers

mongoose unhandled error in promise

Hello, I would like to know how to do it so that once the update of the duration is over, it will be when I show the updated duration. Recipe.insertMany(recipes) .then(recipes => { console.log('${recipes.length} inserted');...
asked by 27.06.2018 / 16:41
0
answers

populate mongoose conditional

I would like to add some documents to Trades, I have tried to populate and it works, however when a trade does not have documents the query is not executed. I would like to know how I can exclude those who do not have "trade in" Oficios.find...
asked by 09.06.2018 / 03:51