Trait Yiisoft\ActiveRecord\Trait\LazyLoadGuardTrait
Trait to detect N+1 queries caused by lazy loading of relations.
See also:
Protected Methods
| Method | Description | Defined By |
|---|---|---|
| retrieveRelation() | Yiisoft\ |
Method Details
| protected \ | ||
| $name | string | |
protected function retrieveRelation(string $name): ActiveRecordInterface|array|null
{
LazyLoadGuard::check($this, $name);
return parent::retrieveRelation($name);
}
User Contributed Notes
Leave a comment
Join the conversation to share a note.