You are here

function field_test_query_efq_table_prefixing_test_alter in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/field/tests/modules/field_test/field_test.module \field_test_query_efq_table_prefixing_test_alter()

Implements hook_query_TAG_alter() for tag 'efq_table_prefixing_test'.

See also

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

File

core/modules/field/tests/modules/field_test/field_test.module, line 124

Code

function field_test_query_efq_table_prefixing_test_alter(&$query) {

  // 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');
}