Provide views join on BASE_TABLE_field_data

Created on 9 July 2021, almost 4 years ago
Updated 5 March 2025, about 1 month ago

Problem/Motivation

In ✨ Support other entities than nodes Needs review i was trying to join field data of commerce_product entities on the taxonomy_entity_index, but realized that taxonomy_entity_index dos only provide a views join on the base table of the entity. If the taxonomy reference is on a field of a bundle, this won't work.

Steps to reproduce

TBD

Proposed resolution

Provide a views join on BASE_TABLE_field_data

Remaining tasks

TBD

User interface changes

None

API changes

None

Data model changes

None

✨ Feature request
Status

Needs work

Version

1.0

Component

Code

Created by

πŸ‡¨πŸ‡­Switzerland luksak

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • First commit to issue fork.
  • πŸ‡ΊπŸ‡ΈUnited States loze Los Angeles

    I made a small update to the MR to use $info->getDataTable() to get the table name and only include it if the entity has a data table.

    I see some modules that provide views integration use something along the lines of
    $table_name = $info->getDataTable() ?: $info->getBaseTable();
    to get the table name for joining entities. Im not sure if thats appropriate here or if doing so would break existing views.

    So I'm just adding this join to the data table which make it work with the parent issue.

  • πŸ‡ΊπŸ‡ΈUnited States loze Los Angeles

    Here's a patch of the latest MR for composer

Production build 0.71.5 2024