src/Entities/Entity.php
public function autoload()
    {
        if (self::$loaded) {
            return;
        }
        
        if (is_array($this->load)) {
            foreach ($this->load as $k => $load) {
                $this->load($load);
            }
        }
        
        if (is_array($this->loadUri)) {
            foreach ($this->loadUri as $k => $load) {
                $this->load([
                    $load => function ($query) {
                        $query->select('id', $query->getForeignKey());
                    }
                ]);
            }
        }
        
        self::$loaded = true;
    }
public function autoload()
    {
        if (self::$loaded) {
            return;
        }
        
        if (is_array($this->load)) {
            foreach ($this->load as $k => $load) {
                $this->load($load);
            }
        }
        
        if (is_array($this->loadUri)) {
            foreach ($this->loadUri as $k => $load) {
                $this->load([
                    $load => function ($query) {
                        $query->select('id', $query->getForeignKey());
                    }
                ]);
            }
        }
        
        self::$loaded = true;
    }
Convert the model's attributes to an array.

@return array