Mongoose plugin to save document data versions. Documents are saved to a "versioned" document collection before saving original documents and kept for later use.
I created a Schema as described in the documentation:
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var version = require('mongoose-version');
var Page = new Schema({
title : { type : String, required : true},
tags : [String],
lastModified : Date,
created : Date
});
Page.plugin(version, { collection: 'Page__versions' });
How can I query Page__versions without having a model to import?
I created a Schema as described in the documentation:
How can I query
Page__versions
without having a model to import?