By xjm on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.0.x
Introduced in version:
8.0.0-beta8
Issue links:
Description:
To support unified Views integration for the Entity Field API, Views now uses the entity's field data table as the base table for a view when it is available. Therefore, EntityViewsData implementations should be updated to use the data table instead of the entity table where possible.
Changes to EntityViewsData implementations
Before
class BlockContentViewsData extends EntityViewsData {
public function getViewsData() {
$data = parent::getViewsData();
$data['block_content']['id']['field']['id'] = 'block_content';
// ....
}
}
After
class BlockContentViewsData extends EntityViewsData {
public function getViewsData() {
$data = parent::getViewsData();
$data['block_content_field_data']['id']['field']['id'] = 'block_content';
// ....
}
}
Changes to Views handlers
Handlers that previously referenced the entity base tables should now reference the supported field tables instead, e.g. in NodeTermData:
- $query = db_select('taxonomy_term_data', 'td');
+ $query = db_select('taxonomy_term_field_data', 'td');Changes to existing data
Existing stored views (including default configuration supplied in modulename/config/install) will need to be updated to reference the new field data base tables for the following entity types: block_content, comment, node, taxonomy_term, user. For example:
-base_table: node
+base_table: node_field_data
Impacts:
Site builders, administrators, editors
Module developers