Spring Data Mongodb upsert and auditing

143 views
Skip to first unread message

Sweta Prasad

unread,
Dec 12, 2014, 5:08:41 PM12/12/14
to mongod...@googlegroups.com
I have a document with the standard audit fields, id, createdDate, lastModifiedDate, etc. When i do mongoTemplate.save() the audit fields are getting populated correctly but when i do a mongoTemplate.upsert() the audit fields dont get populated. Can someone please help?

Will Berkeley

unread,
Dec 14, 2014, 6:14:31 PM12/14/14
to mongod...@googlegroups.com
Hi Sweta. For Spring-specific questions, I'd suggest posting the question on Stack Overflow with the spring or spring-mongodb tags. The Spring project actually has a site, spring.io/questions, where you can go to post Spring questions on SO, and the Spring engineering team does monitor this source. Also, to help out the Spring folks, I suggest including code excerpts that show how you're using .save() and .upsert(). It will make it much easier for them to help you.

-Will
Reply all
Reply to author
Forward
0 new messages