Skip to content

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