Project

General

Profile

Actions

Bug #88955

closed

Language restriction is not automatically taken in account with queryBuilder

Added by Florian Rival over 4 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2019-08-13
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.1
Tags:
Typo3 v9.5.8
Complexity:
Is Regression:
No
Sprint Focus:

Description

Create a request to get data from a table in a repository :

$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('tx_myext_domain_model_table');
$result = $queryBuilder->select('*')
        ->from('tx_myext_domain_model_table')
        ->where(...$conditions)
        ->execute()
        ->fetchAll();

if the table 'tx_myext_domain_model_table' contains translations for other languages (i.e. sys_language_uid > 0) the result returned include the records for all languages while 'sys_language_uid' should have been automatically filtered for the current language.

Actions

Also available in: Atom PDF