| @@ 142-148 (lines=7) @@ | ||
| 139 | $options = $repository->getQuery(); |
|
| 140 | $relation = $this->getModelAttributeKey(); |
|
| 141 | ||
| 142 | if ($this->isEmptyRelation() and ! is_null($foreignKey = $this->getForeignKey())) { |
|
| 143 | $model = $this->getModel(); |
|
| 144 | ||
| 145 | if ($model->{$relation}() instanceof HasOneOrMany) { |
|
| 146 | $options->where($foreignKey, 0)->orWhereNull($foreignKey); |
|
| 147 | } |
|
| 148 | } |
|
| 149 | ||
| 150 | if (count($this->getFetchColumns()) > 0) { |
|
| 151 | $options->select( |
|
| @@ 203-210 (lines=8) @@ | ||
| 200 | ||
| 201 | $options = $repository->getQuery(); |
|
| 202 | ||
| 203 | if ($this->isEmptyRelation() and ! is_null($foreignKey = $this->getForeignKey())) { |
|
| 204 | $relation = $this->getModelAttributeKey(); |
|
| 205 | $model = $this->getModel(); |
|
| 206 | ||
| 207 | if ($model->{$relation}() instanceof HasOneOrMany) { |
|
| 208 | $options->where($foreignKey, 0)->orWhereNull($foreignKey); |
|
| 209 | } |
|
| 210 | } |
|
| 211 | ||
| 212 | if (count($this->getFetchColumns()) > 0) { |
|
| 213 | $options->select( |
|