Skip to content

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

@erredeco

Description

@erredeco

[Description taken from https://forge.typo3.org/issues/80318]

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'
        )
    )
);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions