Stop storing the entity object in the entity reference selection settings

Created on 11 August 2023, over 1 year ago
Updated 13 November 2023, over 1 year ago

Problem/Motivation

Currently, the bert widget stores the entity object in the #selection_settings in order to pass it to the selection handler and use it there. This causes two issues:
The whole entity is serialized and stored in a row in the key_value table, with entity_autocomplete as collection. This takes up unnecessary storage.
For every different entity reference configuration, a new entity_autocomplete row is stored. Due to the dynamic nature of that entity object, a lot of (unnecessary) rows end up in the key_value table.

Proposed resolution

  1. Stop storing the whole entity in the selection settings, maybe stick to entity id & entity type.
  2. Try to avoid storing the entity in the selection settings altogether.
📌 Task
Status

Fixed

Version

2.0

Component

Code

Created by

🇧🇪Belgium dieterholvoet Brussels

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024