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?
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.