Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

serialize for Sequelize #245

Closed
eddyystop opened this issue Aug 10, 2017 · 3 comments
Closed

serialize for Sequelize #245

eddyystop opened this issue Aug 10, 2017 · 3 comments

Comments

@eddyystop
Copy link
Collaborator

A Sequelize-specific hook like serialize is possible using something like https://github.com/hauru/sequelize-to-json

@daffl
Copy link
Member

daffl commented Aug 10, 2017

Is that what the hydrate hooks are doing?

@daffl daffl changed the title serialize for Sequelizer serialize for Sequelize Aug 10, 2017
@eddyystop
Copy link
Collaborator Author

I believe they convert between ORM and POJO objects.

I wonder if Sequelizer caches decisions given a set of includes. If it doesn't, at least some SQL databases cache their strategy decisions for reuse. In such a case there could be a benefit in reusing a set of includes even if they return more data than needed vs customizing for every case. Should that be true, the proposed hook could be useful.

@eddyystop
Copy link
Collaborator Author

Consolidating rfelated discussions in #347

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants