RED-8702: Explore document databases to store entityLog

* refactoring
This commit is contained in:
maverickstuder 2024-03-20 10:49:50 +01:00
parent 30dd8f261d
commit ac9fce2b26

View File

@ -58,8 +58,8 @@ public class EntityLogMongoService {
EntityLogDocument newEntityLogDocument = new EntityLogDocument(dossierId, fileId, entityLog);
List<EntityLogEntryDocument> newEntityLogEntryDocuments = newEntityLogDocument.getEntityLogEntryDocument();
List<EntityLogEntryDocument> toUpdate = new ArrayList<>(oldEntityLogEntryDocuments);
toUpdate.retainAll(newEntityLogEntryDocuments);
List<EntityLogEntryDocument> toUpdate = new ArrayList<>(newEntityLogEntryDocuments);
toUpdate.retainAll(oldEntityLogEntryDocuments);
List<EntityLogEntryDocument> toRemove = new ArrayList<>(oldEntityLogEntryDocuments);
toRemove.removeAll(toUpdate);