[TYPO3-mvc] f:form.select is not saved

Christian Kartnig office at hahnepeter.de
Fri Mar 11 10:49:10 CET 2011


Hi all!

I have a company entity (aggregate root) that has a relation to a 
country entity (aggregate root also), that i want to assign using a 
single selectbox. Everything works out fine, but the country value is 
not updated.

This is my code:

<f:form.select property="country" options="{countries}" 
optionValueField="uid" optionLabelField="name" />

in the controller:
public function updateAction(Tx_Top1001_Domain_Model_Company $company) {
	$this->companyRepository->update($company);
	$this->flashMessageContainer->add('Your Company was updated.');
	$this->redirect('list');
}

If I do a print_r of $company, the country is set to the right value, 
the old country is found in _cleanProperties:private. But this value is 
not saved by companyRepository->update($company);

If I set the country manually (e.g. $company->setCountry(3)) before the 
companyRepository->update($company);, the value is saved.

What am I doing wrong?

Thanks for your help,

Christian


More information about the TYPO3-project-typo3v4mvc mailing list