Is correct to populate just a part of an object with mongoose?

I'll explain myself.

We have something like

var UserSchema = new Schema({
  issuedOffers: [ UserOfferSchema ]
});

var UserOfferSchema = new Schema({
  offer: { type: ObjectId, ref: 'Offer' },
  issuedAt: Date,
  validatedAt: Date,
  status: Number
});

When trying to make populate with this query

User
    .find({})
    .populate('issuedOffers')
    .exec(function(err, users) {
        console.log(users);
        test.equal(10,10);
        test.done();
    });

I get this error

 MissingSchemaError: Schema hasn't been registered for model "undefined".
 Use mongoose.model(name, schema)

I don't know if I'm doing something wrong or It just cannot be populated.

And yes, they all have been registered.

For those who came here I found the solution :)

https://github.com/LearnBoost/mongoose/blob/7ae5a82352f5239316ceba49fabd5f8337cc30cd/test/model.ref.test.js#L513-549

You need a reference between the 2 schemata.

e.g. in your UserOfferSchema:

user: { type: mongoose.Schema.Types.ObjectId, ref: 'User' }