# Mongoose- Modeling Relationships between Connected Data. populate

**URL:** https://forum.codewithmosh.com/t/mongoose-modeling-relationships-between-connected-data-populate/10497
**Category:** Node
**Created:** [February 7, 2022, 7:45am UTC](https://forum.codewithmosh.com/t/mongoose-modeling-relationships-between-connected-data-populate/10497 "2022-02-07T07:45:55Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![gushiyama](https://avatars.discourse-cdn.com/v4/letter/g/c57346/32.png) [@gushiyama](https://forum.codewithmosh.com/u/gushiyama)
#### Post date: [February 7, 2022, 7:45am UTC](https://forum.codewithmosh.com/t/mongoose-modeling-relationships-between-connected-data-populate/10497/1 "2022-02-07T07:45:55Z")

</div>

Hello everyone.

On this section when using the populate() function to show the referenced object it does not show as it is shown in the video. The doc containing the author object shows as [model] instead of the complete object. In the video it shows the full Author object shown using this method.

(cannot show image due to new user limitation).

My result (the result is also different of how it is shown in the video but which is asked on another thread).  
 ![My result](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/2X/5/503bf3356a1a3a7bf0a1339b3898ac57d2903240.png)

The code in question:

```auto
async function listCourses() {
  const courses = await Course.find()
    .populate("author", "name -_id")
    .select("name author");
  console.log(courses);

```

The models:

```auto
const Author = mongoose.model(
  "Author",
  new mongoose.Schema({
    name: String,
    bio: String,
    website: String,
  })
);

const Course = mongoose.model(
  "Course",
  new mongoose.Schema({
    name: String,
    author: {
      type: mongoose.Schema.Types.ObjectId,
      ref: "Author",
    },
  })
);

```

I am using Nodejs version 16.13.2, npm version 8.1.2, and mongoose is the same as the video which is 5.0.3.

---

<div class="post-metadata">

### Author: ![kavfam](https://avatars.discourse-cdn.com/v4/letter/k/a87d85/32.png) [@kavfam](https://forum.codewithmosh.com/u/kavfam)
#### Post date: [March 4, 2022, 8:49pm UTC](https://forum.codewithmosh.com/t/mongoose-modeling-relationships-between-connected-data-populate/10497/2 "2022-03-04T20:49:29Z")

</div>

hi gushiyama. What exectly is the question here? The .populate(“author”, “name -\_id”) doesnt look right?
