I have three tables 'cases', 'partners' and 'casepartners' with the following structure:

> 
> **cases**: id,subject,description
> 
> 
> **partners**: id,name,address
> 
> 
> **casepartners**:case,partner,createdAt
> 
> 
> 

I would like to list all cases by also showing for each case, casepartners records where the case id is the same.

I am using this code:

```
Case.find().sort('-created').exec(function (err, cases) {
        if (err) {
            return res.status(400).send({
                message: errorHandler.getErrorMessage(err)
            });
        } else {
            res.json(cases);
        }
    });

```

It shows all cases fine, but I would like to also show for each case object a list of **casepartners** for that case id...

Let's say a few partners got subscribed to the same case and I would like to list all of those partners or just count how many partners got subscribed to that case.

I am using Angularjs to list all cases using the ng-repeat but I am kinda confused if I have to make a separate call to show casepartners records for each case within ng-repeat or attach this in the same function by using some kind of .populate() or something else with the entity relationships.

These are the models defined:

```
var CaseSchema = new Schema({
    subject: {
        type: String,
        default: '',
        trim: true,
        required: 'Subject cannot be blank'
    },
    description: {
        type: String,
        default: '',
        trim: true
    },
    created: {
        type: Date,
        default: Date.now
    },
    customer: {
        type: Schema.ObjectId,
        ref: 'Customer'
    },
    category: {
        type: Schema.ObjectId,
        ref: 'Category'
    }
});

var CasePartnerSchema = new Schema({
    case: {
        type: Schema.ObjectId,
        ref: 'Case'
    },
    partner: {
        type: Schema.ObjectId,
        ref: 'Partner'
    },
    created: {
        type: Date,
        default: Date.now
    }
});

var PartnerSchema = new Schema({
    name: {
        type: String,
        trim: true,
        default: ''
    },
    created: {
        type: Date,
        default: Date.now
    },
    user: {
        type: Schema.ObjectId,
        ref: 'User'
    }
});

```

Can anyone help with this?