File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -338,10 +338,11 @@ Performance of different deletion strategies
338
338
Deleting an object with all its associated objects can be achieved
339
339
in multiple ways with very different performance impacts.
340
340
341
- 1. If an association is marked as ``CASCADE=REMOVE `` Doctrine ORM
342
- will fetch this association. If its a Single association it will
343
- pass this entity to
344
- ``EntityManager#remove() ``. If the association is a collection, Doctrine will loop over all its elements and pass them to``EntityManager#remove()``.
341
+ 1. If an association is marked as ``CASCADE=REMOVE `` Doctrine ORM will
342
+ fetch this association. If it's a Single association it will pass
343
+ this entity to ``EntityManager#remove() ``. If the association is a
344
+ collection, Doctrine will loop over all its elements and pass them to
345
+ ``EntityManager#remove() ``.
345
346
In both cases the cascade remove semantics are applied recursively.
346
347
For large object graphs this removal strategy can be very costly.
347
348
2. Using a DQL ``DELETE `` statement allows you to delete multiple
You can’t perform that action at this time.
0 commit comments