1.0.0 • Published 8 years ago

mongoose-uniqueid v1.0.0

Weekly downloads
24
License
MIT
Repository
github
Last release
8 years ago

mongoose-uniqueid Build Status

A mongoose plugin for having a unique ObjectId (the '_id' property) across several collections.

Getting Started

Install the module with: npm install mongoose-uniqueid

var mongoose = require('mongoose'),
    Schema   = mongoose.Schema
    uniqueid = require('mongoose-uniqueid');

var UserSchema = new Schema({}, {_id: false});

UserSchema.plugin(uniqueid, {
  models: ['users', 'organizations']
});

var OrganizationSchema = new Schema({}, {_id: false});

Documentation

(Coming soon)

Examples

(Coming soon)

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality.

License

Copyright (c) 2013 Pedro Yamada. Licensed under the MIT license.

Donations

Would you like to buy me a beer? Send bitcoin to 3JjxJydvoJjTrhLL86LGMc8cNB16pTAF3y

1.0.0

8 years ago

0.0.5

10 years ago

0.0.4

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago