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

Xavier Perseguers typo3 at perseguers.ch
Thu Aug 12 11:11:23 CEST 2010


Hi,

>> I have a Company with a contact (1:n => Person).
>>
>> I made an edit form to change the contact (only the contact) using a
>> form.select input element. UpdateAction on Company is properly called
>> with new contact (debug on $company shows the new contact).
>>
>> I make a
>>
>> $this->companyRepository->update($company);
>>
>> but my company is not updated (the contact is still the previous one
>> after the operation). What may be wrong?
>>
>> Xavier
> Hey Xavier,
> I'm have an similiar Problem...
>
> I have an 1:n relation via mm-Table. There also the "adding" from the
> 1-Side like $donation->setProject() does not work.
>
> I always have to do $project->addDonation($donation) and update the
> project, too.

But this is not my case. I don't have a m:n relation but a 1:n, meaning 
I have only one contact associated to the company. This is a dumb 
relation with a field holding the foreign_uid, that's it!

Damn!

Xavier


More information about the TYPO3-project-typo3v4mvc mailing list