Project

General

Profile

Actions

Feature #51245

closed

Epic #86307: Extbase allows to fetch deleted/hidden records (respects ignoreEnableFields)

DataMapper should use defaultquerySettings from repository

Added by Alexander Jahn over 10 years ago. Updated over 3 years ago.

Status:
Rejected
Priority:
Should have
Category:
Extbase
Target version:
-
Start date:
2013-08-22
Due date:
% Done:

100%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

Hi there!

I stumbled upon a problem with the DataMapper.

Currently it is not possible for Extbase to inject hidden records in a model.
While this might not be a problem for frontend use, it certainly is when using extbase in the backend.

Currently, when Extbase builds a query to select an object in DataMapper::getPreparedQuery, it does not use the query created by the corresponding repository where RespectEnableFields might be set.
Instead it creates a plain query with RespectStoragePage and RespectSysLanguage set to false. There is no possibility to set RespectEnableFields.

However, the defaultQuerySettings of the corresponding repository might be quite different.

My patch adresses this mismatch by first trying to get the query from a possible repository. This query uses defaultQuerySettings.
Only if no repository is found, a plain query is created.

The patch is for Extbase 4.7 but Extbase 6.1 uses the same method so my patch should apply there as well


Files

DataMapper.patch (1.76 KB) DataMapper.patch patch for dataMapper Alexander Jahn, 2013-08-22 10:19
DataMapper.patch (1.77 KB) DataMapper.patch fixed patch Alexander Jahn, 2013-08-22 10:23

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #59641: Make Extbase use Repository for internal callsRejected2014-06-18

Actions
Precedes TYPO3 Core - Feature #51250: getObjectByIdentifier should use defaultQuerySettings from repositoryClosed2013-08-232013-08-23

Actions
Actions

Also available in: Atom PDF