removed old post('init') hook in form.server.models
This commit is contained in:
parent
c6b5cad9bf
commit
3fb24954c6
|
@ -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
2202
docs/sample_demographics.json
Executable file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue