0.1.2 • Published 9 years ago

mongoose-link v0.1.2

Weekly downloads
1
License
Apache-2.0
Repository
github
Last release
9 years ago

mongoose-link NPM version Build Status Dependency Status

Link related documents from a mongoose query.

This module provides an alternative way to populate related (linked) documents from a mongoose query.

It does not depend on _id.

Install

$ npm install --save mongoose-link

Usage

var link = require('mongoose-link');
var Comment = require('./Comment');
var User = require('./User');

Comment.
find().
lean().
exec().
then(link.sync(User, 'created_by:user',{email:true}, {lean:true})).
then(function(comments) {  
  //Comments should look like {_id:'5325245af32e34634363', user:{email:'x@x.com'}}
})

License

Apache-2.0 © Lasana Murray

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago

0.0.7

9 years ago

0.0.6

9 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.2

9 years ago

0.0.0

9 years ago