Index: typo3/sysext/dbal/class.ux_t3lib_db.php =================================================================== --- typo3/sysext/dbal/class.ux_t3lib_db.php (revision 5387) +++ typo3/sysext/dbal/class.ux_t3lib_db.php (working copy) @@ -1510,6 +1510,23 @@ * @return string Returns the type of the specified field index */ function sql_field_metatype($table,$field) { + // If $table and/or $field are mapped, use the original names instead + foreach ($this->mapping as $tN => $tMapInfo) { + if (isset($tMapInfo['mapTableName']) && $tMapInfo['mapTableName'] === $table) { + // Table name is mapped => use original name + $table = $tN; + } + + if (isset($tMapInfo['mapFieldNames'])) { + foreach ($tMapInfo['mapFieldNames'] as $fN => $fMapInfo) { + if ($fMapInfo === $field) { + // Field name is mapped => use original name + $field = $fN; + } + } + } + } + return $this->cache_fieldType[$table][$field]['metaType']; }