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 have searched existing issues to ensure the bug has not already been reported
Mongoose version
6.4.4
Node.js version
18.5.0
MongoDB server version
any
Description
Currently when using getters on a sub-schema and enabling toJSON: { getters: true } on the sub-schema, but not in the top-schema, they wont get added, unless the top-schema defines the nested schema as a array
Prerequisites
Mongoose version
6.4.4
Node.js version
18.5.0
MongoDB server version
any
Description
Currently when using getters on a sub-schema and enabling
toJSON: { getters: true }
on the sub-schema, but not in the top-schema, they wont get added, unless the top-schema defines the nested schema as a arraySteps to Reproduce
Reproduction repository + branch: https://github.com/typegoose/typegoose-testing/tree/gettersNotCalled (follow the README#Setup)
Commit with the base example (not arrays): e013ce3f2d4c5827973753c2ef72f4655e7e9e33
Commit with the arrays: 06764561a634d15e791d391736874928d9b17169
Expected Behavior
To have the behavior consistent across both cases (either dont apply getters or apply getters in both cases)
The text was updated successfully, but these errors were encountered: