Hook result data shouldn't have sequelize info
See original GitHub issueWhen using hooks on sequelize services hook.result
has a lot of extra properties on it then just the data. This makes modifying the result data confusing.
Issue Analytics
- State:
- Created 8 years ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
Sequelize ORM, Hooks not working with associations
For anyone who is facing this issue, what worked for me is configuring belongsToMany associations with a model.
Read more >Hooks - Sequelize
Hooks (also known as lifecycle events), are functions which are called before and after calls in sequelize are executed.
Read more >MySQL Connection With Node.js Using Sequelize and Express
js environment, here are the steps to follow: Open an Express web server; Add the configuration data for an existing MySQL database; Open...
Read more >Adding Postgres Search to a Node REST API
And thirdly, databases shouldn't matter to the REST endpoint. ... Before hooks are great for modifying data to fit a DB schema or ......
Read more >FAQ · Feathersjs
We've been collecting some commonly asked questions here. ... For any of the feathers database/ORM adapters you can just use hooks to fetch...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@petermikitsh @bedeoverend we have been talking about doing a breaking change to both feathers-sequelize and feathers-mongoose so that services are initialized with
{raw: true}
and{lean: true}
respectively. @daffl saw some pretty massive performance improvements with using lean vs. without.This is the expected result of using an ORM. That data can be really useful in other scenarios, so it’s generally better to use Sequelize’s methods to convert the model instance to an object. See here for ways of doing this:
http://stackoverflow.com/questions/21961818/sequelize-convert-entity-to-plain-object