DoctrineCollectionscanbedeletedinverysamewayisDoctrineRecordsyoujustcalldelete()method.AsforallcollectionsDoctrineknowshowtoperformsingle-shot-deletemeaningitonlyperformsonedatabasequeryfortheeachcollection.Forexampleifwehavecollectionofuserswhichown[0-*]phonenumbers.Whendeletingthecollectionofusersdoctrineonlyperformstwoqueriesforthiswholetransaction.Thequerieswouldlooksomethinglike:DELETEFROMuserWHEREidIN(1,2,3,...,N)DELETEFROMphonenumberWHEREidIN(1,2,3,...,M)ItshouldalsobenotedthatDoctrineissmartenoughtoperformsingle-shot-deletepertablewhentransactionsareused.SoifyouaredeletingalotofrecordsandwanttooptimizetheoperationjustwrapthedeletecallsinDoctrine_Connectiontransaction.<codetype="php">// delete all users with name 'John'$users=$table->findByDql("name LIKE '%John%'");$users->delete();</code>