Add a choice to use UUID in entity reference values instead of the entity's ID

Created on 1 May 2017, about 8 years ago
Updated 18 November 2024, 7 months ago

Instead of using an entity's primary ID, entity references should use the entity's UUID.
But the change is so huge for Drupal8,
So we can add a choice to use UUID in entity reference values instead of the entity's ID when create a new entity reference field.

It mill make help for

  1. remote entity reference
  2. migrations, e.g. #2748609: [meta] Preserving auto-increment IDs on migration is fragile β†’ .
  3. ...

✨ Feature request
Status

Needs work

Version

11.0 πŸ”₯

Component

field system

Created by

πŸ‡ΊπŸ‡ΈUnited States damienmckenna NH, USA

Live updates comments and jobs are added and updated live.
  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡©πŸ‡ͺGermany c-logemann Frankfurt/M, Germany

    I just found this Issue and wondering why the contrib module " EntityReference UUID β†’ " isn't mentioned here. This already uses "target_uuid" . I use it for example for a base field definition in my contrib module " grant β†’ ". But it also have an UI for Field API. I hope EntityReference UUID will find its way into core.

  • πŸ‡ΊπŸ‡¦Ukraine alphawebgroup Kiev

    @c-logemann
    thank you for mentioning EntityReference UUID β†’ here.
    yes, it can be considered here, as it at least covered by Drupal Security Team, thanks to @pwolanin
    it's minimally maintained as there are nothing to do globally, but pretty stable in main cases where people have cross-system references for example...

  • πŸ‡³πŸ‡±Netherlands cpdp

    +1 to add the Entity Reference UUID β†’ module to core. This module is invaluable in creating distributed webapplications with Drupal.

    In my use case, I have a management webapplication to assign a multitude of taxonomy terms, by entity reference, to fields in several node types. These taxonomies and entity reference assignments are then deployed to several client webapplications.

    Without this module, the entity reference would only consist of the taxonomy term id, which is not transferable to other installations. With this module, I can effortlessly transfer work done on the management webapplication, to the client webapplications.

    Imo, the module does not require changes to core, but only adds functionality. The code is well written, and up to date for Drupal 11 (other than the core_version_requirement tag in the .info.yml). πŸ“Œ Automated Drupal 11 compatibility fixes for entity_reference_uuid Needs review

Production build 0.71.5 2024