collection[] = new CircularReferenceChild('child1', $this); $this->collection[] = new CircularReferenceChild('child2', $this); $this->anotherCollection = new ArrayCollection(); $this->anotherCollection->add(new CircularReferenceChild('child1', $this)); $this->anotherCollection->add(new CircularReferenceChild('child2', $this)); } }