Actions
Bug #17341
closedFieldmapping doesnt work on the "right side" in where clause with table.field
Status:
Closed
Priority:
Should have
Assignee:
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2007-05-30
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
When table.field is given in a where clause on the right side, the mapping doesnt work.
// do we have a field name in the value?
// this is a very simplistic check, beware
if (!is_numeric($sqlPartArray[$k]['value'][0]) && !isset($sqlPartArray[$k]['value'][1])) {
$fieldArray = explode('.', $sqlPartArray[$k]['value'][0]);
if(count($fieldArray)==1 && isset($this->mapping[$t]['mapFieldNames'][$fieldArray[0]])) {
$sqlPartArray[$k]['value'][0] = $this->mapping[$t]['mapFieldNames'][$fieldArray[0]];
} elseif(count($fieldArray)==2 && isset($this->mapping[$fieldArray[0]]['mapFieldNames'][$fieldArray[1]])) {
$sqlPartArray[$k]['value'][0] = $this->mapping[$fieldArray[0]]['mapTableName'].'.'.$this->mapping[$fieldArray[0]]['mapFieldNames'][$fieldArray[1]];
}
}
(issue imported from #M5708)
Actions