sails.js - Effectively using association population in SailsJS -


association auto population sexy during stages of app development. related models result in high number of associated records api calls drastic performance hit. sailsjs provides way toggle globally.

module.exports.blueprints.populate = true / false; 

ideal application disable option globally , load related models on demand , possible ( base use case how laravel things eager loading http://laravel.com/docs/5.0/eloquent#eager-loading ).

you should able override blueprint configuration per controller #/disabling-blueprints-on-a-per-controller-basis

you may override of settings config/blueprints.js on per-controller basis defining '_config' key in controller defintion, , assigning configuration object overrides settings in file.

try in controller want activate populate:

module.exports = {   _config: {     populate: true   } } 

Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -