Bug #87566

Column configuration can't be overridden by child object

Added by Alexander Schnitzler 4 months ago. Updated 4 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2019-01-28
Due date:
% Done:

0%

TYPO3 Version:
10
PHP Version:
7.2
Tags:
Complexity:
medium
Is Regression:
Sprint Focus:

Description

This one is a bit tricky and best explained by an example.

We have the following configuration:

config.tx_extbase.persistence.classes {
    TYPO3\CMS\Extbase\Domain\Model\BackendUser {
        mapping {
            columns {
                username.mapOnProperty = userName
            }
        }
    }
}

and the following one:

config.tx_extbase.persistence.classes {
    TYPO3\CMS\Beuser\Domain\Model\BackendUser {
        mapping {
            columns {
                username.mapOnProperty = overridden
            }
        }
    }
}

It's important to recognize the following heritage:

TYPO3\CMS\Beuser\Domain\Model\BackendUser extends TYPO3\CMS\Extbase\Domain\Model\BackendUser

The issue:
When a datamap is created, the configuration of the child object TYPO3\CMS\Beuser\Domain\Model\BackendUser gets merged with the one of TYPO3\CMS\Extbase\Domain\Model\BackendUser but in a way that the configuration of the child object does not override the one of the parent.

The property of TYPO3\CMS\Beuser\Domain\Model\BackendUser being mapped on field username should be overridden, instead it's the one of the parent (userName).

However, adding new columns works just fine.

History

#1 Updated by Alexander Schnitzler 4 months ago

  • Description updated (diff)

Also available in: Atom PDF