Questions tagged as 'mongodb'

2
answers

Remove an object inside a mongodb array

I have the following document inside a collection in mongodb: { "_id" : ObjectId("5988efbb742568478c6a086f"), "cliente" : "[email protected]", "lista_compras" : [ { "id_produto" : ObjectId("5983bb21834000b1b8...
asked by 09.08.2017 / 01:09
1
answer

Mongodb get records with priority

I have 3 collections in MongoDB being two lists containing only a unique identifier and in the collection remaining the unique identifier, first and last name. What I need to do is a query that is ordered by priority: who is in...
asked by 19.08.2017 / 04:30
1
answer

facebook mongodb rails authentication

Hello, I'm developing an authentication system with facebook, using ruby on rails and mongodb. I need to do the device integration with facebook api (understand like any other social network, too), for the system. I do not find consistent mat...
asked by 26.07.2017 / 22:16
1
answer

How do I search different documents and subdocuments mongodb

I wanted to do a find on a login screen where he checked both the login field of the document and login in the subdocument. Can you do that? { Login: admin, Senha : 12345, _id : 73h2b2k18bdjd88, Nivel : 1 Usuarios [ { Login...
asked by 28.07.2017 / 11:34
0
answers

Installing MongoDB on Debian

I'm trying to run MongoDB on Debian Jessie and apparently installs everything correctly, but when I run it gives errors as indicated below. I do not know if it is relevant either, but following the MongoDB installation page, the apt-get insta...
asked by 15.07.2017 / 04:12
1
answer

I can not edit in CRUD - NodeJS + Express + MongoDB

Following: I started literally today working with NodeJS + Express + MongoDB and as an exercise I started with the famous CRUD (Create, Read, Update, Delete). I was able to do almost anything but edit, I'm really "beating myself" to solve,...
asked by 21.06.2017 / 03:13
1
answer

Node JS - MongoDB x MySQL

Why every Node JS tutorial we see, is always shown example in MongoDB. What do the two have that are so used? Why not use MySQL with Node?     
asked by 17.11.2016 / 22:29
0
answers

save () method of mongoose not saved

I have the following problem: When calling the mongoose save method it seems to be doing nothing. The code for the save is as follows: var newProjects = new projectModel({ "teste":"teste" }); newProjects.save(function (err){ if(err)...
asked by 24.05.2017 / 22:51
2
answers

I can not relate MongoDB to Node

I'm trying to make a page that will have a form written Name and Comment, in which when the person fill in the name and the comment will appear underneath the formular.Só que ta giving error. Below this my file EJS and Just below the server file...
asked by 27.05.2017 / 02:12
1
answer

Error in Mongoose findOne

I'm getting Error: Invalid argument to findOne(): 'texto pesquisado' when running findOne of Mongoose: const User = mongoose.model('users', mySchema); const query - 'texto pesquisado'; User.findOne(query, function(err, data) {...
asked by 12.05.2017 / 23:41