[TYPO3-mvc] Updating a list empties it!

Xavier Perseguers xavier at typo3.org
Tue May 10 10:58:23 CEST 2011


Hi,

Context:
I have companies providing services, for each service I have contacts.

Problem:
When I add a contact within BE, it shows up correctly. When I do the 
same in FE, the list of contacts is emptied.

How it's done:
CompanyController->show() provides the list of services and the 
corresponding contacts, I may edit a given service which leads to an 
edit action in ServiceController. My ServiceController has an addContact 
action which does this:

$service->addContact($contact);
$this->serviceRepository->update($service);

and then redirects to CompanyController->show().

I tracked down the update into Persistence/Backend, within method 
replaceObject. All is fine but in the end my service has no more 
contacts anymore!

What is wrong with my code?

-- 
Xavier Perseguers
Release Manager TYPO3 4.6

TYPO3 .... inspiring people to share!
Get involved: http://typo3.org



More information about the TYPO3-project-typo3v4mvc mailing list