[TYPO3-mvc] remove related objects recursively with extbase

Philipp philippwrann at gmx.at
Tue Jul 9 08:19:37 CEST 2013


No, if your aggregate only holds the reference objects it wont delete the foreign records - of course. You would have to write your own reference object which also has a cascade remove annotation to the original record. But to delete the physical file on the server you may have to write a task that checks for non used elements. I dont think you could use the destruct method to check fot the file and unlink it. But if a file is only bound to exactly one record, why store a relation-data, why not just make an imploded list of file-records or your own file record, pointing to your aggregate. THAT you could remove using cascade remove and you could implement a TCE main hook to check for the file and in case delete it....


More information about the TYPO3-project-typo3v4mvc mailing list