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

fix: fixing schema type based on timestamps schema options value #14829

Merged
merged 1 commit into from
Aug 26, 2024

Conversation

ark23CIS
Copy link
Contributor

ignoring timestamps schema options field if createdAt, updatedAt fields are string, non-literal fields in TS.

Fix #14825

Summary
Currently, InferSchemaType and InferRawDocType incorrectly infer schema type based on timestamps schema options fields when the fields have a string type instead of string literal type. In order to avoid the incorrect users behavior mongoose will ignore the timestamp fields

@vkarpov15
Copy link
Collaborator

Thanks 👍

@vkarpov15 vkarpov15 added this to the 8.5.5 milestone Aug 26, 2024
@vkarpov15 vkarpov15 merged commit 5dc2e90 into Automattic:master Aug 26, 2024
3 checks passed
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

Successfully merging this pull request may close these issues.

.populate() clobbers the return type with { [x: string]: NativeDate; }
2 participants