-
Notifications
You must be signed in to change notification settings - Fork 1.1k
@CreatedAt annotation not working with nested document field #3547
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
Comments
Did you follow the setup to enable auditing in Spring Data MongoDB? |
Thanks for sharing the link. |
You do not need to provide |
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed. |
Yeah enabling auditing worked. |
I also faced such problem... It is not possible to store given information in a nested object Judging by the questions on stackoverflow, I'm not the only one with this problem |
I am needing this today. Unable to find a solution. WIll go manual setting ir and I don't like it |
No solution for this using nested/embeddable classes? |
@xisvaldo |
I followed this link and could achieve using |
I am using Spring Boot 2.4.0.
The POJO class mapped to collection is:
I am using MongoRepository to save above POJO in DB using
save()
.But I don't see the
createdAt
andupdatedAt
being populated in the collection.This is what is being saved in collection:
The text was updated successfully, but these errors were encountered: