Issue Bug Closed

#91656Mapping to sys_category is not working anymore in TYPO3 10

Kurt Gusbeth 06/16/20, 15:54 updated 06/19/20, 21:13

Description

In TYPO3 9 I could extend sys_category in my extension by setting via TypoScript:

plugin.tx_myext.persistence {
    classes {
        MyNamespace\MyExt\Domain\Model\Category {
            mapping {
                recordType = 0
                tableName = sys_category
            }
        }
    }
}

And creating a model-file with

class Category extends \TYPO3\CMS\Extbase\Domain\Model\Category

And a repository-file with

class CategoryRepository extends \TYPO3\CMS\Extbase\Domain\Repository\CategoryRepository

After that I can use

$categoryRepository = $this->objectManager->get('MyNamespace\\MyExt\\Domain\\Repository\\CategoryRepository');
$oneCategory = $categoryRepository->findOneByUid(172);

This not working anymore with TYPO3 10. I get this error:

(1/3) #1472074485 TYPO3\CMS\Extbase\Persistence\Generic\Storage\Exception\SqlErrorException

Table 'mydatabase.tx_myext_domain_model_category' doesn't exist

The mapping to sys_category is lost!

Is there another workaround?

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.