Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
erredeco opened this issue Jul 30, 2018 · 0 comments
Open

Comments

@erredeco
Copy link

[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'
        )
    )
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant