Waterline MongoDb (populated) fetched object looses its type AND prototype functions
问题 I'm using sails with mongo db over waterline. Lets say that I declare 2 models in my sails project like so : A user model @ models/User.js simplified: username: { type: 'string', unique: true }, passports: { collection: 'Passport', via: 'owner' }, aUserFunction: function(){ console.log('I'm a user function'); } and a passport model @ models/Passport.js simplified: password: { type: 'string' }, owner: { model: 'User', required: true }, aPassportFunction: function(){ console.log('I'm a passport