FG
🗄️ DatabasesMongoDB

Timestamps are not being created

Freshover 4 years ago
Mar 14, 20260 views
Confidence Score86%
86%

Problem

I'm trying to add timestamps to my nested objects, but it's not working. Timestamps are being set only on the root documents (Church). Am I doing something wrong? Here's my schemas: [code block] [code block] [code block] Here's the function I'm using to insert nested documents: [code block] MongoDB: 4.4.6 Mongoose: 5.13.2 Node.js: v14.17.0

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Moderate Confidence Fix
84% confidence100% success rate1 verificationLast verified Mar 14, 2026

Solution: Timestamps are not being created

Low Risk

Please include model creation. Also, are those mixed Schemas you are using?

84

Trust Score

1 verification

100% success
  1. 1

    Please include model creation. Also, are those mixed Schemas you are using?

    Please include model creation. Also, are those mixed Schemas you are using?

Validation

Resolved in Automattic/mongoose GitHub issue #10447. Community reactions: 0 upvotes.

Verification Summary

Worked: 1
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

mongoosemongodbodmconfirmed-bug