Simplify SqlContentEntityStorage::countFieldData()

Created on 12 April 2018, over 6 years ago
Updated 30 January 2023, almost 2 years ago

Problem/Motivation

\Drupal\Core\Entity\Sql\SqlContentEntityStorage::countFieldData() should not need to know if it's querying a field stored in a shared or dedicated table.

Proposed resolution

After #2955442: Add a way to get all the tables in which a field is stored from TableMappingInterface lands, we'll have a way of getting the table name of a field regardless of whether it is a dedicated table or not and if it stores all revisions or just the default one.

So we should also be able to simplify countFieldData() and make it work only with information given by the table mapping interface, and not to rely on core's default implementation (DefaultTableMapping).

Remaining tasks

Discuss / review.

User interface changes

Nope.

API changes

Nope.

Data model changes

Nope.

📌 Task
Status

Needs work

Version

10.1

Component
Entity 

Last updated about 2 hours ago

Created by

🇷🇴Romania amateescu

Live updates comments and jobs are added and updated live.
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.

  • The Needs Review Queue Bot tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

    Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.

    Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

Production build 0.71.5 2024