-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
[Types] mongoose 6.4.0 (PR 11563) broke explicitly set property types #11960
Comments
fix(types): avoid adding non-existent properties from model constructor for typegoose
Can confirm that installing 3a4ba27 (current latest master) fixes all mentioned issues in the reproduction repository branch |
Thanks @hasezoey , and I'm sorry for the inconvenience. We'll ship 6.4.1 on Monday. |
i have just now tried version 6.4.1 and noticed that when using see https://github.com/typegoose/typegoose-testing/tree/mongoose6.4.0typebreak ( Edit: i have extended the test case initially added for this issue in #12001 |
Thanks for identifying these issues @hasezoey |
Prerequisites
Mongoose version
6.4.0
Node.js version
any
MongoDB server version
any
Description
With mongoose 6.4.0 (i think because of #11563) the explicitly set property types are ignored and so break subdocuments, subdocument arrays and maps (and probably other types that require more than explicit objects or get transformed)
Steps to Reproduce
mongoose6.4.0typebreak
yarn install
(or equivalent)yarn run build
(or equivalent)this branch also contains commits for previous versions:
ef07ac6df32938f30cadbbb955b5f0af0301b536
for a typegoose inital example (mongoose 6.3.9) (HEAD~2
)23d7787e5101cdee81c267cda0f4745c70b6a46f
for a mongosoe native (no typegoose) example at 6.3.9 (HEAD~1
)fc31453a5463f03d434fb1459dfb26ce4a770bbb
for a mongoose native (no typegoose) example at 6.4.0 (HEAD
)Expected Behavior
All types to work like in the previous minor version / explicitly set types to overwrite inferred types
The text was updated successfully, but these errors were encountered: