@@ 286-297 (lines=12) @@ | ||
283 | /** |
|
284 | * {@inheritdoc} |
|
285 | */ |
|
286 | public function containsKey($key) |
|
287 | { |
|
288 | if (!$this->initialized && $this->association['fetch'] === ApiMetadata::FETCH_EXTRA_LAZY |
|
289 | && isset($this->association['indexBy']) |
|
290 | ) { |
|
291 | $persister = $this->manager->getUnitOfWork()->getCollectionPersister($this->association); |
|
292 | ||
293 | return $this->collection->containsKey($key) || $persister->containsKey($this, $key); |
|
294 | } |
|
295 | ||
296 | return parent::containsKey($key); |
|
297 | } |
|
298 | ||
299 | /** |
|
300 | * {@inheritdoc} |
|
@@ 302-311 (lines=10) @@ | ||
299 | /** |
|
300 | * {@inheritdoc} |
|
301 | */ |
|
302 | public function contains($element) |
|
303 | { |
|
304 | if (!$this->initialized && $this->association['fetch'] === ApiMetadata::FETCH_EXTRA_LAZY) { |
|
305 | $persister = $this->manager->getUnitOfWork()->getCollectionPersister($this->association); |
|
306 | ||
307 | return $this->collection->contains($element) || $persister->contains($this, $element); |
|
308 | } |
|
309 | ||
310 | return parent::contains($element); |
|
311 | } |
|
312 | ||
313 | /** |
|
314 | * {@inheritdoc} |