8.5.x field_test.module field_test_query_efq_table_prefixing_test_alter(&$query)
8.0.x field_test.module field_test_query_efq_table_prefixing_test_alter(&$query)
8.1.x field_test.module field_test_query_efq_table_prefixing_test_alter(&$query)
8.2.x field_test.module field_test_query_efq_table_prefixing_test_alter(&$query)
8.3.x field_test.module field_test_query_efq_table_prefixing_test_alter(&$query)
8.4.x field_test.module field_test_query_efq_table_prefixing_test_alter(&$query)
8.6.x field_test.module field_test_query_efq_table_prefixing_test_alter(&$query)
7.x field_test.module field_test_query_efq_table_prefixing_test_alter(&$query)

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