code: function (m1, m2) {
      var proj = {};
      proj[pathName] = {$elemMatch: {_id: m2}};
  
      return function (done) {
        this.findById(m1, proj, function (err, doc) {
          if (err) return done(err);
          if (!doc) return done("friendship not found");
          done(null, doc[pathName][0]);
        });
      }
    }
docs: Generate a function to return one side of a friendship between
  two models
  
  @param Model the extending model
  @param m1 the model or model _id being queried
  @param m2 the model or model _id whose friendship is queried for
  
  @returns a function which will call back with an friendship for m2 on m1
  @api private