LearnBoost/mongoose — pull request #2103 by bodokaiser (2014-05-26 18:12:01+00:00)
Title: getters not working for refs

I found this issue as I wanted to do:

```
var schema = new Schema({
payments: [
{
ref: 'Payment',
type: ObjectId
}
]
});

schema.virtual('supportedPayments').get(function() {
var payments = this.getValue('payments');

return payments.map(function(payment) {
return payment.type;
});
});

schema.path('payments').get(function(articles) {
return articles.map(function(article) {
return article.id;
});
});
```