/** * {@inheritdoc} */ public function contains($element) { if (!$this->isValidType($element)) { return false; } return parent::contains($element); }
/** * {@inheritdoc} */ public function contains($element) { if (!$this->initialized && $this->association['fetch'] === ClassMetadata::FETCH_EXTRA_LAZY) { $persister = $this->em->getUnitOfWork()->getCollectionPersister($this->association); return $this->collection->contains($element) || $persister->contains($this, $element); } return parent::contains($element); }