Hi, I have a Schema defined in one module, and in another module, I modify the Schema and add mongoose-auth support to it.
When a user is returned from User.where('email', email).findOne( function (err, user) {
...the object structure looks like below. I have to dig into the _doc property to get at the real model properties -- why is this? I'm wondering if something is mis-configured b/c of the mongoose-auth manipulation. The user docs indicate that _doc is an internal property not to be directly manipulated which leads me to believe something about what I am doing is wrong.
- _activePaths: Object
- _doc: Object
- _events: Object
- _maxListeners: 0
- _posts: Object
- _pres: Object
- _saveError: null
- _selected: undefined
- _shardval: undefined
- _strictMode: false
- _validationError: null
- errors: undefined
- isNew: false
- save: function () { var self = this , hookArgs // arguments eventually passed to the hook - …
- __proto__: Object