@@ 249-252 (lines=4) @@ | ||
246 | $class = null; |
|
247 | $className = null; |
|
248 | ||
249 | if ($mapping['storeAs'] === ClassMetadata::REFERENCE_STORE_AS_ID) { |
|
250 | $className = $mapping['targetDocument']; |
|
251 | $class = $this->dm->getClassMetadata($className); |
|
252 | } |
|
253 | ||
254 | foreach ($persistentCollection->getMongoData() as $reference) { |
|
255 | $id = ClassMetadata::getReferenceId($reference, $mapping['storeAs']); |
|
@@ 257-260 (lines=4) @@ | ||
254 | foreach ($persistentCollection->getMongoData() as $reference) { |
|
255 | $id = ClassMetadata::getReferenceId($reference, $mapping['storeAs']); |
|
256 | ||
257 | if ($mapping['storeAs'] !== ClassMetadata::REFERENCE_STORE_AS_ID) { |
|
258 | $className = $this->uow->getClassNameForAssociation($mapping, $reference); |
|
259 | $class = $this->dm->getClassMetadata($className); |
|
260 | } |
|
261 | ||
262 | $document = $this->uow->tryGetById($id, $class); |
|
263 |