Active
Project:
Permanent Entities
Version:
8.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
6 Nov 2019 at 14:12 UTC
Updated:
23 Jul 2021 at 19:05 UTC
Jump to comment: Most recent
The current implementation of identifier for Permanent Entities is great for doing things like
PermenentEntity::load('jupiter');
but this also makes the primary key a string. If you need to change the name of the entity you will need to also update this key in a lot of tables:
UPDATE permanent_entity SET id = 'NEW_NAME' WHERE id = 'OLD_NAME';
UPDATE permanent_entity_field_data SET id = 'NEW_NAME' WHERE id = 'OLD_NAME';
UPDATE permanent_entity_field_revision SET id = 'NEW_NAME' WHERE id = 'OLD_NAME';
UPDATE permanent_entity_revision SET id = 'NEW_NAME' WHERE id = 'OLD_NAME';
UPDATE permanent_entity_revision__field_random_field1 SET entity_id = 'NEW_NAME' WHERE entity_id = 'OLD_NAME';
UPDATE permanent_entity_revision__field_random_field2 SET entity_id = 'NEW_NAME' WHERE entity_id = 'OLD_NAME';
UPDATE permanent_entity_revision__field_random_field3 SET entity_id = 'NEW_NAME' WHERE entity_id = 'OLD_NAME';
UPDATE permanent_entity_revision__field_random_field4 SET entity_id = 'NEW_NAME' WHERE entity_id = 'OLD_NAME';
UPDATE permanent_entity_revision__field_random_field5 SET entity_id = 'NEW_NAME' WHERE entity_id = 'OLD_NAME';
UPDATE permanent_entity_revision__field_random_field6 SET entity_id = 'NEW_NAME' WHERE entity_id = 'OLD_NAME';
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
dagmarI will create a 2.x branch of this module to address this issue.