Bug #59992 ยป datamapper-localizations.patch
typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/DataMapper.php | ||
---|---|---|
* @return object An object of the given class
|
||
*/
|
||
protected function mapSingleRow($className, array $row) {
|
||
if ($this->identityMap->hasIdentifier($row['uid'], $className)) {
|
||
$object = $this->identityMap->getObjectByIdentifier($row['uid'], $className);
|
||
// Take localized UID into account to allow for mapping
|
||
// original records and translations in a single session
|
||
$uid = isset($row['_LOCALIZED_UID']) ? $row['_LOCALIZED_UID'] : $row['uid'];
|
||
if ($this->identityMap->hasIdentifier($uid, $className)) {
|
||
$object = $this->identityMap->getObjectByIdentifier($uid, $className);
|
||
} else {
|
||
$object = $this->createEmptyObject($className);
|
||
$this->identityMap->registerObject($object, $row['uid']);
|
||
$this->identityMap->registerObject($object, $uid);
|
||
$this->thawProperties($object, $row);
|
||
$object->_memorizeCleanState();
|
||
$this->persistenceSession->registerReconstitutedEntity($object);
|