You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
eliomaria
changed the title
Using virtuals with full languages. Question
Using virtuals with full languages.
Oct 14, 2019
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.
The text was updated successfully, but these errors were encountered: