Questions tagged as 'mongodb'

1
answer

Is it possible to visually display another value for a certain value in the bank?

I'm doing a ToDo and I need to define it in priority (urgent, high, medium and low). But I can only define by integer (1 is urgent, 2 is high etc) The question is: can you show another value in html but assign it to the original in the bank?...
asked by 25.10.2017 / 20:05
1
answer

Sort a list of objects by a string list

I would like in the GetAll function to already bring the list of posts in order according to the list of IDs passed by the module.Higlights List<Post> posts = new List<Post>(); var posts = PostService.GetAll(module.Highlights...
asked by 27.10.2017 / 03:16
1
answer

Aggregate and lookup in subdocuments

I'm having trouble returning a join in mongodb using the lookup in subdocuments. I may have modeled it wrong, if you can give me some tips I'll be grateful! :) I have the following collections: Students { "_id" : ObjectId("59b825c41e1...
asked by 21.09.2017 / 13:32
1
answer

Error in MongoDB / Mongoose?

I'm trying to start my server, but when I try to start it, it says MongoDB error, and I've been looking for a solution to this problem for some time now, and so far I have not found anything. What complicates even more is the fact that I was...
asked by 19.09.2017 / 18:46
1
answer

Is it possible to use node.js in cpanel?

I want to make both an application and a website communicate with my database through node.js . I would like to know if any host as the simplest ones that have cpanel (godaddy) support node.js or mongoDB in>.     
asked by 05.09.2017 / 02:45
1
answer

Dynamic columns in the view mongodb

Hello, I have a job where I need to create a view of a mongo db, but some columns of this view should be calculated at runtime, similar to mysql NOW (), for example: When I do a find in the view, I need a column comes with the current date....
asked by 15.09.2017 / 21:39
0
answers

Avoid repeated names in json

I'm looking for a form / function / method so that it is not possible to repeat the value saved in Json, for example: I'm saving the json below and I do not want it to save the same name in json. [ [ { "id": "59a5c80dc7596929783...
asked by 30.08.2017 / 15:56
1
answer

How to mount an object?

I would like the key and the cotação and modalidade value of the confronto collection to be in their respective objects whose id is equal in the palpites collection. How can I do this? [{ "_id": "59b445ed...
asked by 09.09.2017 / 22:08
1
answer

MongoDB - Filtering returns

I would like to know how I can be filtering the results returned in my mongodb queries in this scenario, I will have to return the sector names and contacts for each sector from the company ID, but I would like to return only those records that...
asked by 04.09.2017 / 14:35
1
answer

Node.js - Aggregate object returns

I'm locally doing the Node.js exercise as MongoDB proposed at link There are two collections, orders and product . After aggregation, the expected result would be: [ { _id: 1, product_id: 154, status: 1, orderdetails: [ { _id:...
asked by 09.09.2017 / 02:52