changed set updatedDocument

This commit is contained in:
Francesco Mangiacrapa 2023-04-19 11:07:34 +02:00
parent c273a2db2c
commit 76f67587e7
1 changed files with 3 additions and 1 deletions

View File

@ -190,7 +190,9 @@ public class ProfiledMongoManager extends MongoManager implements MongoManagerI<
Document filter = new Document(mongoIDFieldName(), asId(proj.getId())).append(Project.LOCK + "." + Lock.ID,
oldLock.getId());
Document setUpdatedDocument = new Document("$set", new Document(Project.THE_DOCUMENT, proj.getTheDocument()));
String documentValueAsJson = proj.getTheDocument().toJson();
String updatedDocumentAsJson = new Document(Project.THE_DOCUMENT,documentValueAsJson).toJson();
Document setUpdatedDocument = new Document("$set", updatedDocumentAsJson);
log.info("Filter document is {} ", filter.toJson());
log.info("$set is {} ", setUpdatedDocument);