From 8a455e83f0c9b025aa0f9e5ba801e88a2a604b64 Mon Sep 17 00:00:00 2001 From: zadam Date: Wed, 27 Oct 2021 22:28:33 +0200 Subject: [PATCH] fix creating inverse relations --- src/public/app/entities/note_short.js | 7 ++----- src/services/handlers.js | 5 ----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/public/app/entities/note_short.js b/src/public/app/entities/note_short.js index 448d88959..18537d7a4 100644 --- a/src/public/app/entities/note_short.js +++ b/src/public/app/entities/note_short.js @@ -644,12 +644,9 @@ class NoteShort { } /** - * Clear note's attributes cache to force fresh reload for next attribute request. - * Cache is note instance scoped. + * @deprecated NOOP */ - invalidateAttributeCache() { - this.__attributeCache = null; - } + invalidateAttributeCache() {} /** * Get relations which target this note diff --git a/src/services/handlers.js b/src/services/handlers.js index d1c03bbce..75caaaa52 100644 --- a/src/services/handlers.js +++ b/src/services/handlers.js @@ -137,8 +137,6 @@ eventService.subscribe(eventService.ENTITY_CHANGED, ({ entityName, entity }) => value: note.noteId, isInheritable: entity.isInheritable }).save(); - - targetNote.invalidateAttributeCache(); } }); }); @@ -150,9 +148,6 @@ eventService.subscribe(eventService.ENTITY_DELETED, ({ entityName, entity }) => for (const relation of relations) { if (relation.value === note.noteId) { - note.invalidateAttributeCache(); - targetNote.invalidateAttributeCache(); - relation.markAsDeleted(); } }