| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 3 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 27 | public function addEagerConstraints(array $models) |
||
| 28 | { |
||
| 29 | // We'll grab the primary key name of the related models since it could be set to |
||
| 30 | // a non-standard name and not "id". We will then construct the constraint for |
||
| 31 | // our eagerly loading query so it returns the proper models from execution. |
||
| 32 | $key = $this->ownerKey; |
||
| 33 | |||
| 34 | $whereIn = $this->whereInMethod($this->related, $this->ownerKey); |
||
|
|
|||
| 35 | |||
| 36 | $this->query->where($key, 'IN', $this->getEagerModelKeys($models)); |
||
| 37 | } |
||
| 39 |