Linked Questions

3 votes
1 answer
1k views

I'm new with mongodb and I have wrote query using mongoose populate. this.model.findById({ _id: req.params.id }) .populate('potentialLevels', 'description result plIndex') .populate({ path: '...
javabrain's user avatar
  • 135
0 votes
2 answers
1k views

I have the following documents loanRequest (Writing just the keys that I want to project) { "_id": "5f2bf26783f65d33026ea592", "lendingpartner": { /* some keys ...
Swagnik Dutta's user avatar
1 vote
1 answer
507 views

I have two collections, orders and products. I like to join all the order.items[] to products collection to add more fields to the items[] Sample Data: orders [{ _id: 1, items: [ { product_id: 1, ...
Bharat's user avatar
  • 3,521
0 votes
1 answer
335 views

I can't seem to sort this mongo/mongoose query. The first one returns the exact results, just not sorted in the opposite direction. const UserSchema = new Schema({ username : String, ...
totalnoob's user avatar
  • 2,781
2 votes
1 answer
322 views

I have three collection contain data as like bellow, Clients Collection { "_id" : ObjectId("5a058e316803fafd127b23c9"), "client_name" : "client A", "client_status" : "A" } { "_id"...
Shijin TR's user avatar
  • 7,809
1 vote
0 answers
219 views

so I have the task to combine 2 collections into 1 to be able to search by additional parameter queries like ac_key or ac_value, but the reality is not as expected, this only works for one collection,...
Heru Wijayanto's user avatar
1 vote
1 answer
125 views

I have already asked this question, but for some reason someone marked it as duplicate to this $lookup multiple levels without $unwind? and i don't understand why, my expected output is to directly ...
john cramer's user avatar
0 votes
1 answer
103 views

I have a subdocument that is nested as an array. Inside that subdocument I have references to other models. Using the .Find and .Populate methods I can receive the entire objects for single models ...
ruskibenya's user avatar
0 votes
1 answer
79 views

When i combine 2 table to fetch data from mongoDB collection struck with my expected out. please any one help me to fix the same pleas. Collection: recipecatagories { "_id":{"$oid":"...
Sivaprakash D's user avatar
0 votes
1 answer
90 views

I have 2 collections,1st is: { "_id" : ObjectId("62eb5713ac2dccfb0a75d6c0"), "title" : "Agile Web Development with Rails", "...
Noob_Mern_Dev's user avatar
1 vote
1 answer
67 views

Currently I have this query: Post.find().populate([ { path: 'page', populate: { path: 'url', populate: { path: 'i18n', ...
Lito's user avatar
  • 1,362
0 votes
0 answers
69 views

I have two MongoDB collections which are joined like that var userSchema = new Schema({ username: String, location: {type: mongoose.Schema.Types.ObjectId, ref: 'Location' }, }); var ...
Adrian Dragomir's user avatar
0 votes
0 answers
51 views

how can i make execution more faster, following query is taking 3.3 seconds to execute from 55,000 records, as per me the $elemMatch is taking more time, without that condition it executes in ...
Mr. J's user avatar
  • 320
0 votes
1 answer
40 views

I have 2 schemas (event, venue) Event Schema is as shown below: var mongoose = require('mongoose'); var bcrypt = require('bcryptjs'); var EventSchema = mongoose.Schema({ _id:mongoose.Schema.Types....
Varun Singh's user avatar

15 30 50 per page
1
2