Core Sails.js hook that integrates Waterline ORM. Version 3.30.0. Provides loading of adapters, model hydration, auto-migration prompts, and global model exposure. Forks from official Sails core to implement additional features without breaking changes. Relies on moduleloader and userconfig hooks. Disabling this hook breaks blueprints and pubsub hooks. Defaults to sails-disk adapter and global model variables.
npm install sails-orm-hookNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Loads Sails with the ORM hook, creates a model, and logs the result. Uses sails-disk in-memory.
Set sails.config.models.migrate to 'safe', 'alter', or 'drop' in production.
Set sails.config.globals.models to false if you prefer explicit access via sails.models.
Install and configure a valid adapter (e.g., sails-disk): npm install sails-disk --save, and set sails.config.datastores.default.adapter
Ensure sails.config.hooks includes moduleloader and userconfig, and they load before orm.
Set sails.config.models.migrate explicitly to 'safe' or another value.