Project

General

Profile

Actions

Bug #91656

closed

Mapping to sys_category is not working anymore in TYPO3 10

Added by Kurt Gusbeth almost 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2020-06-16
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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?

Actions

Also available in: Atom PDF