Issue Feature Closed

#82986Extbase Model - includeDeleted and ignoreEnableFields

Reindl Bernd 11/13/17, 16:10 updated 10/23/26, 06:23

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?

Reviews 0

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

Files 1

History 4

  1. Alexander Schnitzler commented and changed status New Closed <span data-processor="relativetime" data-value="2026-10-23T06:23:13+00:00" > 10/23/26, 06:23 </span>

    Thanks for the request and the patched classes. Per-property options like includeDeleted@ and ignoreEnableFields@ are not planned as such.

    The underlying problem is that relation queries do not take over the visibility settings (ignoreEnableFields, includeDeleted) of the query that loaded the parent object. That is now tracked in #110215 “Typo3QuerySettings must be context aware”, which bundles this issue with #84955 and #86307. Its scope is context-aware defaults for frontend, backend and CLI, and passing the settings of the root query on to the queries that resolve relations.

    I’m closing this issue in favour of #110215 and have added a relation to it. Please follow #110215 and comment there if your use case needs more than that.

    Until then, related records that are hidden or deleted can be fetched through a repository method with its own query settings.