From f309190486e34e5ef80ea783cad07b7bdd67efba Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Fri, 23 Jul 2010 23:46:47 +0200 Subject: [PATCH] Clarified up and downsides of $collection->toArray() --- manual/en/working-with-objects.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/manual/en/working-with-objects.txt b/manual/en/working-with-objects.txt index b17d81fb0..cc0878069 100644 --- a/manual/en/working-with-objects.txt +++ b/manual/en/working-with-objects.txt @@ -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 domain model as well as your preferences.