1.2.1 • Published 10 years ago

mongoose-type-dbref v1.2.1

Weekly downloads
7
License
MIT
Repository
github
Last release
10 years ago

mongoose-type-dbref

A DBRef field-type for Mongoose schemas

npm

usage

This will validate DBRefs, correctly:

var mongoose = require('mongoose');
require('mongoose-type-dbref');

var UserSchema = new mongoose.Schema({
    ref: {type: mongoose.SchemaTypes.DBRef, required: true, namespace: "MyNamespace"}
});

That is all...

Anything else you want to do, do it yourself :)

Note: Arrays are not supported

Testing

npm test
1.2.1

10 years ago

1.2.0

10 years ago

1.1.0

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago