Convert DefaultTableMapping::setFieldNames() and ::setExtraColumns() to protected methods

Created on 11 July 2019, almost 5 years ago
Updated 30 June 2024, 2 days ago

Problem/Motivation

The two DefaultTableMapping::setFieldNames() and ::setExtraColumns() methods are internal helpers of the table mapping class and should not be exposed as public API.

Proposed resolution

Change them to be protected instead.

Remaining tasks

Wait until the 9.0.x branch is opened, write a patch, etc.

User interface changes

Nope.

API changes

Nope.

Data model changes

Nope.

Release notes snippet

Nope.

πŸ“Œ Task
Status

Active

Version

11.0 πŸ”₯

Component
EntityΒ  β†’

Last updated less than a minute 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.

  • πŸ‡©πŸ‡ͺGermany tstoeckler Essen, Germany

    Just stumbled upon this. Currently there is not really an easy way to modify the default table mapping, in my opinion. Unless you actually want something radically different providing a different (sub-)class other than DefaultTableMapping, while possible, is not actually very helpful, because you may need to copy the entire class just to change a few lines. Having these methods public, currently allows avoiding that and actually making small alterations with just a small amount of code. See πŸ› Cannot use UUID as entity ID Needs review for something that is currently fixable fairly cleanly from custom code which would become impossible, not in principle, but in reality, if these methods were made protected.

    Since this also does not bring any maintainability gain as far as I can tell, I am against this until we have a different more bespoke API for actually customizing the entity table layout.

  • πŸ‡©πŸ‡ͺGermany tstoeckler Essen, Germany
Production build 0.69.0 2024