Hi Team - I think fixing this issue created another bug (DATAMONGO-1051). If it would have been doSave(…) only then @Version could have been used for already existing entities as well, As doSave(..) internally decides on the basis of Unique Id that to do an Insert or Update on the same.
But currently if a @version is added to an existing entity it calls doInsert(..) over it according to the Null Check in MongoTemplate.doSaveVersioned(…)
One work around discussed on that issue is to add a default version values in older documents but updating millions n millions of older records in a production environment is not a feasible solution if they are growing continously.
Thanks! - Please think on this.