spring-data-mongodb icon indicating copy to clipboard operation
spring-data-mongodb copied to clipboard

@LastModifiedDate not supported for reactiveBulkOperations replaceOne

Open tank3a opened this issue 8 months ago • 0 comments

I was trying to run this code and found out that @LastModifiedDate annotation in my MyDocumentType entity is not automatically put into my document. The field is disappeared.

var bulkOps = reactiveMongoTemplate.bulkOps(BulkOperations.BulkMode.UNORDERED, MyDocumentType.class);

var query = new Query(Criteria.where("_id").is(doc.getId()));
var option = new FindAndReplaceOptions().upsert();
bulkOps.replaceOne(query, doc, option);

tank3a avatar Mar 31 '25 23:03 tank3a