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

Maximum call stack size exceeded error with class transformer #68

Closed
javialon26 opened this issue Apr 1, 2020 · 5 comments
Closed

Maximum call stack size exceeded error with class transformer #68

javialon26 opened this issue Apr 1, 2020 · 5 comments

Comments

@javialon26
Copy link

I'm submitting a...


[ ] Regression 
[X] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

Using Sequelize models with class-transformer and ClassSerializerInterceptor crash the app with Maximum call stack size exceeded error.

Expected behavior

Serialize models without error.

Minimal reproduction of the problem with instructions

  1. Follow the Sequelize guide and create and endpoint with a ClassSerializerInterceptor

What is the motivation / use case for changing the behavior?

Environment


Nest version: 7.0.7

 
For Tooling issues:
- Node version: 12.16.1
- Platform: All

Others:


"@nestjs/sequelize": "^0.1.0",
"class-transformer": "^0.2.3",
"sequelize": "^5.21.5",
"sequelize-typescript": "^1.1.0"
@kamilmysliwiec
Copy link
Member

Please, report this issue in the class-transformer/sequelize-typescript repository

@javialon26
Copy link
Author

ok thanks and by the way, for now, I overwrite the toJson method of the model in order to remove the fields.

@Sotatek-HoangNguyen2
Copy link

hello @javialon26 how can i serialize the model using toJson method please show me da way!

@aviNrich
Copy link

@Sotatek-HoangNguyen2 || @javialon26 did you find a solution for this?
Thanks

@Sotatek-HoangNguyen2
Copy link

No, i haven't! Sorry

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

No branches or pull requests

4 participants