This repository was archived by the owner on Sep 16, 2021. It is now read-only.
This repository was archived by the owner on Sep 16, 2021. It is now read-only.
AutoRouteManager doesn't re-translate objects back to current translation #145
Closed
Description
Hi,
The AutoRouteManager translates Documents onFlush to any available locale in order to generate their Uri:
Line 101: $this->adapter->translateObject($uriContextCollection->getSubjectObject(), $locale);
But does not translate them back to the translation they had right before they were persisted/flushed.
In my case this leads to that I need to translate my object back:
$document = $dm->findTranslation(null, '/cms/document', 'de');
// => available locales: en, de
$document->setTitle('New title');
$dm = $this->get('doctrine_phpcr.odm.document_manager');
$dm->persist($page);
$dm->flush();
// $document->getLocale() => 'en'
Is this intended, or am I missing something? ;-)
Cheers