[TYPO3-mvc] updateAction not saving field extending another Model
Michael Staatz
info at mduttlinger.de
Fri Feb 19 10:57:38 CET 2010
Am 19.02.2010 09:38, schrieb Søren Malling:
>> Hi,
>> i had a similar problem.
>>
>> i could fix it with these lines:
>> $persistanceManager = Tx_Extbase_Dispatcher::getPersistenceManager();
>> $persistanceManager->persistAll();
>
> Where did you place those lines? I've tried to place them in a
> constructer in my repository but it made my extbase return a error
> about calling a function on a non-member
>
> Regards,
>
> Søren
Hi Søren,
public function updateAction(){
...
$format = new Tx_Mwcsvtable_Domain_Model_Format();
$format->setTitle($title);
$format->setFormatid($formatid);
$this->formatRepository->add($format);
$format->setGenerate($form);
$this->formatRepository->update($format);
$persistanceManager = Tx_Extbase_Dispatcher::getPersistenceManager();
$persistanceManager->persistAll();
...
}
Best,
Michael
More information about the TYPO3-project-typo3v4mvc
mailing list