[TYPO3-mvc] Persist objects after adding or updating

Matthew Colton mat.colton at web-xs.de
Sat Jul 26 09:30:43 CEST 2014


Hi,
no, you don't have to persist the object in that case.

Cheers,
Matthew

Am 26.07.2014 08:48, schrieb Dirk Wenzel:
> Hi all,
> is it necessary to persist extbase objects manually after adding or
> updating them?
>
> In ObjectController:
>
> createAction($object) {
>  $object->setValue('foo');
>  $this->objectRepository->add($object);
>
> ?>> $this->persistenceManager->persistAll();
>  $this->redirect('show' ...)
> }
>
> updateAction($object) {
>  $object->setValue('foo');
>  $this->objectRepository->update($object);
>
> ?>> $this->persistenceManager->persistAll();
>  $this->redirect('show' ...)
> }
>
> I do not need to access any (updated) property after adding/updating
> in this actions.
>
> Thank you for any advice!
> Dirk
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
>



More information about the TYPO3-project-typo3v4mvc mailing list