Skip to content

@Version should be considered in MongoTemplate#remove [DATAMONGO-2195] #3060

Closed
@spring-projects-issues

Description

@spring-projects-issues

Christoph Strobl opened DATAMONGO-2195 and commented

When deleting / removing a versioned entity, via MongoTemplate#remove(Object) the actual version of the given value should be taken into account when creating the delete query.

{ "_id" : { "$oid" : "5c51af6d5c2b762adffcc787" }, "version" : 3 }

In case the returned DeleteResult was acknowledged and the number of removed entries is zero an OptimisticLockingFailureException should be thrown.
 


Issue Links:

  • DATAMONGO-2196 Remove does not apply WriteConcern for single document delete operation
    ("is depended on by")

Referenced from: pull request #641

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions