1
0
mirror of synced 2024-12-14 23:26:04 +03:00

Clarified up and downsides of $collection->toArray()

This commit is contained in:
Benjamin Eberlei 2010-07-23 23:46:47 +02:00
parent 3b76ea9ffe
commit f309190486

View File

@ -457,6 +457,10 @@ and encapsulating all the details inside the classes can be challenging.
} }
} }
This will however always initialize the collection, with all the performance penalties given the size. In
some scenarios of large collections it might even be a good idea to completely hide the read access behind
methods on the EntityRepository.
There is no single, best way for association management. It greatly depends on the requirements of your concrete There is no single, best way for association management. It greatly depends on the requirements of your concrete
domain model as well as your preferences. domain model as well as your preferences.