-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Timestamps are not being created #10447
Comments
Please include model creation. Also, are those mixed Schemas you are using? |
|
|
|
Do you need something else? |
Integration and Service |
|
|
|
Let me know if you need anything else |
And you're not getting an error message at all? |
No, I'm not receiving any error messages. Everything runs fine, but when I check my database, there is no "createdAt" or "updatedAt" in users or events, only in churches. |
Here is an example
|
|
I've tried to run and it worked but I didn't understand, is it a bug or a mistake of mine? |
when you ran it you saw timestamps where they should be? |
Yes. |
paste your output please. |
|
this should have timestamps correct? |
Yes, you're right! Sorry, I didn't notice the only the first user has a timestamp. |
@IslandRhythms So the problem is in findOneAndUpdate? |
We'll have to investigate so can't really say right now. This is a bug |
Okay, let me know if I can do anything to help. |
I did this await Wallpaper.create(data, {session}) instead of |
this is work well for me ,thanks brother |
It's my pleasure to contribute towards the community.
…On Wed, 6 Sep 2023 at 8:26 AM, Aditya Marzuk ***@***.***> wrote:
I did this *await Wallpaper.create(data, {session})* instead of *let
wallpaper = new Wallpaper(data, { session }) wallpaper = await
wallpaper.save()* and it works for me.
this is work well for me ,thanks brother
—
Reply to this email directly, view it on GitHub
<#10447 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANMEKBDOJLETS2POJO5MJMTXY7Q47ANCNFSM5AG6MI3Q>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
This issue with timestamps is still there and also strict is not working @IslandRhythms |
@rajathongal please open a new issue and follow the issue template |
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:
Here's the function I'm using to insert nested documents:
MongoDB: 4.4.6
Mongoose: 5.13.2
Node.js: v14.17.0
The text was updated successfully, but these errors were encountered: