#91324Visibility restrictions are added twice for Extbase ObjectStorage relations
Description
In \TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbQueryParser::convertQueryToDoctrineQueryBuilder(), a \TYPO3\CMS\Core\Database\Query\QueryBuilder is created by calling \TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbQueryParser::initializeQueryBuilder(). If $source is a \TYPO3\CMS\Extbase\Persistence\Generic\Qom\JoinInterface, which is the case for ObjectStorage, default TYPO3 enablefield constraints (QueryBuilder restrictions) do not get removed. This is done when $source is not a JoinInterface.
After wards, constraints are added in \TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbQueryParser::addTypo3Constraints(), where Query::$querySettings are taken into account.
- enable field constraints are added twice to the resulting SQL query
- manipulated QuerySettings in an implementation of
\TYPO3\CMS\Extbase\Persistence\Generic\QueryFactory\QueryFactoryare ignored for relations with ObjectStorage (suggested here: https://stackoverflow.com/a/39994951/13483282)
Reviews 3
Related issues 2
History 4
-
Markus Klein changed Related to #94119 <span data-processor="relativetime" data-value="2021-05-20T10:09:47+00:00" > 05/20/21, 10:09 </span>
-
Markus Klein changed Related to #90013 <span data-processor="relativetime" data-value="2021-05-20T10:10:30+00:00" > 05/20/21, 10:10 </span>
-
Benni Mack commented and changed status
NewNeeds Feedback <span data-processor="relativetime" data-value="2025-08-14T16:17:11+00:00" > 08/14/25, 16:17 </span> -
Georg Ringer commented and changed status
Needs FeedbackClosed <span data-processor="relativetime" data-value="2026-09-02T13:30:27+00:00" > 09/02/26, 13:30 </span>closing the issue because of lack of feedback. feel free to contact me to reopen it or create a new issue if still valid
Hey, I’m pretty sure I fixed this last month – together with #92442 – can you confirm this is gone in v13?