function FieldTestHooks::queryEfqTablePrefixingTestAlter

Implements hook_query_TAG_alter() for tag 'efq_table_prefixing_test'.

Attributes

#[Hook('query_efq_table_prefixing_test_alter')]

See also

\Drupal\system\Tests\Entity\EntityFieldQueryTest::testTablePrefixing()

File

core/modules/field/tests/modules/field_test/src/Hook/FieldTestHooks.php, line 76

Class

FieldTestHooks
Hook implementations for field_test.

Namespace

Drupal\field_test\Hook

Code

public function queryEfqTablePrefixingTestAlter(&$query) : void {
  // Add an additional join onto the entity base table. This will cause an
  // exception if the EFQ does not properly prefix the base table.
  $query->join('entity_test', 'et2', '[%alias].[id] = [entity_test].[id]');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.