Issue Bug Closed

#81049Not possible to use different DB connection for tables, defined in TCA due to Reference Index

Viktor Livakivskyi 04/27/17, 16:56 updated 10/02/18, 11:01

Description

Hi,

I’m really excited about the feature, which allows separation of tables with different databases.
But actually I’m unable to use it for any table, which has TCA definition. As soon as such a table appears in a different Connection and record is saved in BE, I’m getting:

An exception occurred while executing 'SELECT `uid` FROM `tabalename` WHERE `uid` = ?' with params [1]: Table 'db-name.tablename' doesn't exist 

Stacktrace shows the problem:

TYPO3\CMS\Core\DataHandling\DataHandler::updateRefIndex("tablename", 1)

The record itself is saved in separate DB and is accessible in BE lists and edit form, but any save in BE brings this exception.

Looking at the code I can say, that problem is in ReferenceIndex reusing the Connection object, but not sure if it is done for purpose or just a bug?

Reviews 2