public function ref($defaults = []) : Model
    {
        return $this->getModel($defaults)
            ->addCondition(
                $this->their_field ?: ($this->owner->table.'_'.($this->owner->id_field ?: 'id')),
                $this->getOurValue()
            );
    }
public function ref($defaults = []) : Model
    {
        return $this->getModel($defaults)
            ->addCondition(
                $this->their_field ?: ($this->owner->table.'_'.($this->owner->id_field ?: 'id')),
                $this->getOurValue()
            );
    }
public function ref ( $ defaults = [ ] ) : Model { return $ this -> getModel ( $ defaults ) -> addCondition ( $ this -> their_field ? : ( $ this -> owner -> table . '_' . ( $ this -> owner -> id_field ? : 'id' ) ) , $ this -> getOurValue ( ) ) ; }
Returns referenced model with condition set.

@param array $defaults Properties

@throws Exception

@return Model
Returns referenced model with condition set .