|
@@ 400-410 (lines=11) @@
|
| 397 |
|
/** |
| 398 |
|
* {@inheritdoc} |
| 399 |
|
*/ |
| 400 |
|
public function containsKey($key) |
| 401 |
|
{ |
| 402 |
|
if (! $this->initialized && $this->association['fetch'] === ClassMetadata::FETCH_EXTRA_LAZY |
| 403 |
|
&& isset($this->association['indexBy'])) { |
| 404 |
|
$persister = $this->em->getUnitOfWork()->getCollectionPersister($this->association); |
| 405 |
|
|
| 406 |
|
return $this->collection->containsKey($key) || $persister->containsKey($this, $key); |
| 407 |
|
} |
| 408 |
|
|
| 409 |
|
return parent::containsKey($key); |
| 410 |
|
} |
| 411 |
|
|
| 412 |
|
/** |
| 413 |
|
* {@inheritdoc} |
|
@@ 415-424 (lines=10) @@
|
| 412 |
|
/** |
| 413 |
|
* {@inheritdoc} |
| 414 |
|
*/ |
| 415 |
|
public function contains($element) |
| 416 |
|
{ |
| 417 |
|
if ( ! $this->initialized && $this->association['fetch'] === ClassMetadata::FETCH_EXTRA_LAZY) { |
| 418 |
|
$persister = $this->em->getUnitOfWork()->getCollectionPersister($this->association); |
| 419 |
|
|
| 420 |
|
return $this->collection->contains($element) || $persister->contains($this, $element); |
| 421 |
|
} |
| 422 |
|
|
| 423 |
|
return parent::contains($element); |
| 424 |
|
} |
| 425 |
|
|
| 426 |
|
/** |
| 427 |
|
* {@inheritdoc} |