| @@ 49-60 (lines=12) @@ | ||
| 46 | ||
| 47 | $collection = $this->fetch($this->definition->entity(), $conditions, true); |
|
| 48 | ||
| 49 | foreach ($collection as $relEntity) { |
|
| 50 | $key = $this->buildForeignKey($relEntity, $this->definition->keys()); |
|
| 51 | ||
| 52 | if (!isset($relations[$key])) { |
|
| 53 | continue; |
|
| 54 | } |
|
| 55 | ||
| 56 | foreach ($relations[$key] as &$entity) { |
|
| 57 | $this->accessor->addPropertyValue($entity, $this->definition->container(), $relEntity); |
|
| 58 | unset($entity); |
|
| 59 | } |
|
| 60 | } |
|
| 61 | ||
| 62 | return $result; |
|
| 63 | } |
|
| @@ 44-55 (lines=12) @@ | ||
| 41 | ||
| 42 | $collection = $this->fetch($this->definition->entity(), $conditions, true); |
|
| 43 | ||
| 44 | foreach ($collection as $relEntity) { |
|
| 45 | $key = $this->buildForeignKey($relEntity, $this->definition->keys()); |
|
| 46 | ||
| 47 | if (!isset($relations[$key])) { |
|
| 48 | continue; |
|
| 49 | } |
|
| 50 | ||
| 51 | foreach ($relations[$key] as &$entity) { |
|
| 52 | $this->accessor->setPropertyValue($entity, $this->definition->container(), $relEntity); |
|
| 53 | unset($entity); |
|
| 54 | } |
|
| 55 | } |
|
| 56 | ||
| 57 | return $result; |
|
| 58 | } |
|