Feature #82986
openEpic #86307: Extbase allows to fetch deleted/hidden records (respects ignoreEnableFields)
Extbase Model - includeDeleted and ignoreEnableFields
0%
Description
Hello,
sometimes it is required to load also deleted Objects. With an Repository this is allready supportet by the QuerySettings setIncludeDeleted and setIgnoreEnableFields.
But if you need the deleted items on a relation property within a model, there is no option for.
So i modified 3 core classes (see attached files) to add the ability to load deleted and hidden (enable columns) objects.
@includeDeleted includes deleted objects for the property
@ignoreEnableFields ignores the enable fields for the property
/** * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\VENDOR\Extension\Domain\Model\Material> * @includeDeleted */ protected $material;
/** * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\VENDOR\Extension\Domain\Model\Material> * @ignoreEnableFields */ protected $material;
At the moment i use the "config.tx_extbase.objects" typoscript path to override the core classes with an extension where the modifications are located. But this can cause problems when the core files where updated. So is it possible to implement this feature into the core?
Files