Issue Bug Closed

#80318dbal rename mapFieldNames doesn't work for more than one record/row

franklin eaton 03/17/17, 10:18 updated 07/30/18, 22:21

Description

<?php
The rename of the return array doesn’t work correctly.
If you get more then on record/row from the external database, only the first record keys (from the return array) will renamed.
So you can’t handle the other records/row, especially if u map uid.
It will resu

Setup:

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['dbal']['handlerCfg'] = array(
    '_DEFAULT' => array(
        'type' => 'native',
        'config' => array(
            'username' => '',
            'password' => '',
            'host'     => '',
            'database' => ''
        )
    ),

    'external_db' => array(
        'type' => 'native',
        'config' => array(
            'username' => 'external_db_user',
            'password' => 'external_db_pass',
            'host' => 'external_db_host',
            'database' => 'external_db_database',
        )
    ),
);

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['dbal']['table2handlerKeys'] = array(
    'external_db_table' => 'external_db',
);

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['dbal']['mapping'] = array(
    'local_db_table' => array(
        'mapTableName' => 'external_db_table',
        'mapFieldNames' => array(
            'local_db_table_column' => 'external_db_table_column'
        )
    )
);

Reviews 0

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