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

Using virtuals with full languages. #27

Open
eliomaria opened this issue Oct 14, 2019 · 0 comments
Open

Using virtuals with full languages. #27

eliomaria opened this issue Oct 14, 2019 · 0 comments

Comments

@eliomaria
Copy link

I need to use both .toObject() and .toJSON() options of my model and i have defined other virtual fields that i required.

Is there a way that i can use in my model: toJSON: { virtuals: true }, toObject: { virtuals: true } and receive both the fields i need and the full language object as well?
As far as i understood with the library, if i use the virtual it will override the object and return only the default language. Is there any option to override this?

Thank you in advance.

@eliomaria eliomaria changed the title Using virtuals with full languages. Question Using virtuals with full languages. Oct 14, 2019
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

1 participant