function field_test_query_efq_table_prefixing_test_alter

Same name in other branches
  1. 9 core/modules/field/tests/modules/field_test/field_test.module \field_test_query_efq_table_prefixing_test_alter()
  2. 8.9.x core/modules/field/tests/modules/field_test/field_test.module \field_test_query_efq_table_prefixing_test_alter()
  3. 10 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

EntityFieldQueryTestCase::testTablePrefixing()

File

modules/field/tests/field_test.module, line 269

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('test_entity', 'te2', '%alias.ftid = test_entity.ftid');
}

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