atk4\data\Join::hasOne PHP Method

hasOne() public method

creates reference based on a field from the join.
public hasOne ( $model, $defaults = [] )
    public function hasOne($model, $defaults = [])
    {
        if (!is_array($defaults)) {
            $defaults = ['model' => $defaults];
        }
        $defaults['join'] = $this;
        return $this->owner->hasOne($model, $defaults);
    }