removed old post('init') hook in form.server.models

This commit is contained in:
David Baldwynn 2015-08-14 10:24:14 -07:00
parent c6b5cad9bf
commit 3fb24954c6
2 changed files with 2203 additions and 18 deletions

View file

@ -110,25 +110,8 @@ FormSchema.pre('remove', function (next) {
});
}
});
var _original;
// FormSchema.post( 'init', function() {
// _original = this.toObject();
// console.log(this);
// } );
// FormSchema.virtual('_original').get(function () {
// this.constructor // ≈ mongoose.model('…', FieldSchema).findById
// .findOne({_id: this._id}).exec(function(err, original){
// if(err) {
// console.log(err);
// throw err;
// } else {
// console.log(original);
// if(original) return original.toObject();
// else return null;
// }
// });
// });
//Set _original
FormSchema.pre('save', function (next) {

2202
docs/sample_demographics.json Executable file

File diff suppressed because it is too large Load diff