hapi-sequelize-crud
hapi-sequelize-crud copied to clipboard
Hapi plugin that automatically generates RESTful API for CRUD
Added feature to allow filtering relationships/associations based on http://docs.sequelizejs.com/en/latest/docs/querying/#relations-associations
I have 2 models: * product with 1 field: name * category with 1 field: name Association is: * product belongsTo category The problem is: When i try to **GET**...
I have 3 models: * product with 1 field: name * category with 1 field: name * price with 1 field: price Associations are: * product belongsTo category * product...
- [x] ?include (#27) - [x] ?where - [x] ?order (#31) - [x] ?limit (#33) - [x] ?offset (#33) - [x] simple crud - [ ] association crud - [...
I have the following associations defined: ``` javascript module.exports = ({ Assessment, Event, Organisation }) => { Event.hasMany(Assessment, {foreignKey:'eventId'}); Event.belongsTo(Organisation, {foreignKey:'organisationId'}); } ``` Calling `http://localhost:3030/api/seq/events?include=Assessment` or `http://localhost:3030/api/seq/events?include=Organisation` produces the response,...