Skip to content
Snippets Groups Projects
Unverified Commit 74b61fbc authored by Stefan Auditor's avatar Stefan Auditor Committed by Stefan Auditor
Browse files

Issue #3236771 by cecrs, sanduhrs: Entity Reference fields broken for PET...

Issue #3236771 by cecrs, sanduhrs: Entity Reference fields broken for PET Entities: Fix base table definition
parent de675640
Branches
Tags
No related merge requests found
......@@ -13,10 +13,20 @@ function pet_update_8401() {
}
/**
* Update PET entity data_table annotation.
* Update PET entity base_table annotation.
*/
function pet_update_8402() {
// Replace values in the 'entity.definitions.installed' key_value collection.
\Drupal::service('entity_field.manager')->clearCachedFieldDefinitions();
$key_value_store_definition = \Drupal::keyValue('entity.definitions.installed');
$storage_definitions = $key_value_store_definition->get('pet.entity_type');
$storage_definitions->set('base_table', 'pets');
$key_value_store_definition->set('pet.entity_type', $storage_definitions);
}
/**
* Update PET entity data_table annotation.
*/
function pet_update_8403() {
\Drupal::service('entity_field.manager')->clearCachedFieldDefinitions();
$key_value_store_definition = \Drupal::keyValue('entity.definitions.installed');
$storage_definitions = $key_value_store_definition->get('pet.entity_type');
......
......@@ -32,7 +32,7 @@ use Drupal\pet\PetInterface;
* },
* "access" = "Drupal\pet\PetAccessControlHandler",
* },
* base_table = "pet",
* base_table = "pets",
* data_table = "pets_field_data",
* admin_persmission = "administer previewable email templates",
* fieldable = FALSE,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment