I want to \"empty\" an ObjectStorage when updating a Object:
It\'s TYPO3 4.6 with a Extbase Extension which allows you to show/add/edit/delete datasets in the frontend.
Call the detach or removeAll methods to remove certain or all objects of the storage.
detach
removeAll
/** @var \Tx_Extbase_Persistence_ObjectStorage $organisationPartners */ $organisationPartners = $organisation->getPartner(); foreach ($organisationPartners as $partner) { $organisationPartners->detach($partner); }