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: Add _id property on subdocuments #231

Merged
merged 1 commit into from
Jul 16, 2024

Conversation

alukach
Copy link
Contributor

@alukach alukach commented Jun 27, 2024

As discussed in #221 (comment), there are times where Mongoose's TS support falls down. One of those is the handling of _id properties on hydrated subdocuments (see Automattic/mongoose#14660). We can avoid this issue by manually adding the _id to each subdocument schema. This should have no impact on how the system interacts with the DB, but that should be verified via manual testing.

@nathanielrindlaub nathanielrindlaub merged commit 9963189 into main Jul 16, 2024
3 checks passed
@nathanielrindlaub nathanielrindlaub deleted the feature/typescript/add-_id-to-subdocuments branch July 16, 2024 22:00
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.

3 participants