public function initializeCollection($object)
{
if (!$this->isCollection()) {
throw new \LogicException(sprintf('The property mapping this relationship is not of collection type in "%s"', $this->className));
}
if ($this->getValue($object) instanceof ArrayCollection || is_array($this->getValue($object)) || $this->getValue($object) instanceof LazyRelationshipCollection) {
return;
}
if (null === $this->getValue($object)) {
$this->setValue($object, new Collection());
return;
}
//throw new \RuntimeException(sprintf('Unexpected initial value in %s', $this->className));
}