[Flow] Upgrade to Flow 2.0: changes in persistence?

Regine Rosewich regine.rosewich at hoellenberg.biz
Fri Aug 30 12:12:14 CEST 2013


Hi François,

I suppose you did try it already  with
"$this->persistenceManager->persistAll()" after
"$this->eventRepository->update($event)"?

Regine



Am 30.08.13 11:57 schrieb "François Suter" unter <fsu-lists at cobweb.ch>:

>Hi all,
>
>Next question on my way to Flow 2.0. I seem to have some actions whose
>results do not get persisted anymore. For example, consider this very
>simple action:
>
>/**
>  * Attaches the given event object to a parent
>  *
>  * @param \Cobweb\Monitoring\Domain\Model\Event $parent The parent
>event to attach to
>  * @param \Cobweb\Monitoring\Domain\Model\Event $event The event to
>attach
>  * @return void
>  */
>public function attachAction(Event $parent, Event $event) {
>	if ($event->getMonitoring()->getInstance()->getGroupMembership() !==
>$parent->getMonitoring()->getInstance()->getGroupMembership()) {
>	$this->addFlashMessage(
>				$this->translator->translateById('client.must.match', array(), NULL,
>NULL, 'Main', 'Cobweb.Monitoring'),
>				$this->translator->translateById('event.not.attached', array(),
>NULL, NULL, 'Main', 'Cobweb.Monitoring'),
>			\TYPO3\Flow\Error\Message::SEVERITY_ERROR
>		);
>	} else {
>		$event->setParent($parent);
>		$this->eventRepository->update($event);
>		$this->addFlashMessage(
>			$this->translator->translateById('event.attached', array(), NULL,
>NULL, 'Main', 'Cobweb.Monitoring')
>		);
>	}
>	$this->redirect('index');
>}
>
>With FLOW3 1.1 it worked flawlessly, with Flow 2.0 the "parent" column
>stays empty in the database.
>
>I can't find anything relevant in the upgrade notes. Any advice?
>
>Cheers
>
>-- 
>
>Francois Suter
>
>Work: Cobweb Development Sarl - http://www.cobweb.ch
>
>TYPO3: Help the project! - http://typo3.org/contribute/
>
>Appreciate my work? Support me -
>http://www.monpetitcoin.com/en/francois/support-me/
>
>_______________________________________________
>Flow mailing list
>Flow at lists.typo3.org
>http://lists.typo3.org/cgi-bin/mailman/listinfo/flow




More information about the Flow mailing list