Attach meta data to Sequelize models.
Warning: This package is not production-ready. If you have exprience with Sequelize help will be appreciated.
Metaable adds the ability to access meta data as if it is a property on your model. Metable is Fluent, just like using an Sequelize model attribute you can set or unset metas.
The normal singular/plural naming scheme in Sequelize is used:
- model name:
modelName + Meta
- table name:
modelName + Metas
Install through npm.
npm install sequelize-metaable --save
var Sequelize = require('sequelize');
var Metaable = require('sequelize-metaable');
var UserMeta = Metaable(UserModel, sequelize);
To Set and Get meta, please use the common Sequelize Relations / Associations methods (Examples coming soon).