[TYPO3-mvc] Cannot update a 1:n relation [BUG FOUND]

Xavier Perseguers typo3 at perseguers.ch
Fri Aug 13 07:13:31 CEST 2010


Hi Franz,

> How does your update action look like? Something like this?
>
> function updateAction(Tx_ExtKey_Domain_Model_Company $company) {
> $this->companyRepository->update($company);
> }

Yes, exactly like that!

> Or do you update you $company object by hand via something like this:
>
> function updateAction(Tx_ExtKey_Domain_Model_Contact $contact,
> Tx_ExtKey_Domain_Model_Company $company) {
> $company->setContact($contact);
> $this->companyRepository->update($company);
> }

No. The modification happens through a <f:form.select property="contact" 
options={company.persons}" size="1" /> in my edit form.

> The later has to work in any way - the previous might have an issue with
> the argument mapping, memorizing the clean state at a wrong stage.
>
> Please tell me which way you do it and I'll have a look at the
> responsible codes.

Thanks.

Xavier


More information about the TYPO3-project-typo3v4mvc mailing list