#66535Property _localizedUid is not set correctly
Description
If I set the _localizedUid Property inside my Model to aime to an translated Record, the origin Record gets overwriten. The Problem is caused in the Class TYPO3\CMS\Extbase\Persistence\Generic\Backend in Line 856.
There is the Property set to the current Record UID, so the Object is overwriten.
original Code (Lines 855 – 857):
if ($object->_getProperty(‘_localizedUid’) !== NULL) {
$row[‘uid’] = $object->_getProperty(‘_localizedUid’);
}
should be changed to:
if ($object->_getProperty(‘_localizedUid’) !== NULL && $dataMap->getTranslationOriginColumnName() !== NULL) {
$row[$dataMap->getTranslationOriginColumnName()] = $object->_getProperty(‘_localizedUid’);
}
after that Change everything works as expected.