Questions tagged [mongoose-populate]

The Mongoose ODM has a populate() feature which lets you reference related documents in other collections. Mongoose can populate a single document, multiple documents, plain object, multiple plain objects, or all objects returned from a query.

MongoDB 3.2+ servers include a $lookup aggregation feature which enables joining query results from multiple collections in the same database.

The Mongoose ODM provides a client-side alternative called populate(), which lets you reference related documents in other collections (including those in different databases).

Population is the process of automatically replacing the specified paths in the document with document(s) from other collection(s). Mongoose can populate a single document, multiple documents, plain object, multiple plain objects, or all objects returned from a query.

Related Links

1023 questions
-1
votes
1 answer

Single Angular Controller w/ multiple $HTTP Get request

I have two mongoose schemas running in on my server end. I would like to add two $http.get request in my app.js and eventually display two tables from my collection in MongoDB on a webpage. Only one get function is called without errors.…
Ekom
  • 599
  • 3
  • 8
  • 24
-2
votes
1 answer

Mongoose cannot do deep populate

I've: User model (from UserSchema) Specialty model (from SpecialtySchema) Session model (from SessionSchema) User has reference field specialities : specialities: [{ type: Schema.Types.ObjectId, ref: 'Specialty' }] Session has reference field…
DarkArtistry
  • 434
  • 1
  • 6
  • 22
-3
votes
1 answer

FindById & FindOne do not work on IDs or usernames that I get from Angular Local Storage

I'm making a courier system, in which one franchise needs to dispatch a package to another franchise. User inputs the name of the franchise the package needs to go & I'm fetching the ID & storing in "dispatchedTo". While I'm getting the ID of…
1 2 3
68
69