title: What is the use of initializing collections in the constructor
body: <p>I'm using Doctrine with Symfony and the entity generator initializes collection in the entity's constructor. For example:</p>
  
  <pre><code>/**
   * @var MyProject\MyBundle\Entity\Foo
   * 
   * @ORM\ManyToMany(targetEntity="MyProject\MyBundle\Entity\Foo")
   */
  private $foos;
  
  public function __construct() {
      $this-&gt;foos = new \Doctrine\Common\Collections\ArrayCollection();
  }
  </code></pre>
  
  <p>And I can read in <a href="http://doctrine-orm.readthedocs.org/en/latest/reference/best-practices.html#initialize-collections-in-the-constructor" rel="noreferrer">Doctrine's best practices</a> that... it is a good practice to do so.</p>
  
  <p>But the question is: <strong>what is the interest?</strong> </p>
  
  <p>I don't see any change if I remove this line in the constructor. I guess it is lazy-loaded then, but is the performance drop significant enough to take the time to write the constuctor (the <code>app/console doctrine:generate:entities</code> command doesn't feed the constructor with new ArrayCollection if the constructor already exist, so I have to do it manually).</p>
  
  <p>And if it is really better to do it, should I do it for all relation or only the <code>nullable=false</code> one? </p>
  
  <p>Imagine the entity <code>Car</code> in OneToMany with <code>Wheel</code> (not nullable) and OneToMany with <code>Passenger</code> (nullable). Should I initialyze only <code>$wheels</code> or both? And why ?</p>