public function _prepareAsFilterValue()
    {
        if (is_null($this->_fields)) {
            $queryset = $this->asArray(['pk']);
        } else {
            if (count($this->_fields) > 1) {
                throw new TypeError('Cannot use multi-field values as a filter value.');
            }
            $queryset = $this->_clone();
        }

        return $queryset->query->toSubQuery($queryset->connection);
    }
public function _prepareAsFilterValue()
    {
        if (is_null($this->_fields)) {
            $queryset = $this->asArray(['pk']);
        } else {
            if (count($this->_fields) > 1) {
                throw new TypeError('Cannot use multi-field values as a filter value.');
            }
            $queryset = $this->_clone();
        }

        return $queryset->query->toSubQuery($queryset->connection);
    }
public function _prepareAsFilterValue ( ) { if ( is_null ( $ this -> _fields ) ) { $ queryset = $ this -> asArray ( [ 'pk' ] ) ; } else { if ( count ( $ this -> _fields ) > 1 ) { throw new TypeError ( 'Cannot use multi-field values as a filter value.' ) ; } $ queryset = $ this -> _clone ( ) ; } return $ queryset -> query -> toSubQuery ( $ queryset -> connection ) ; }
Ready this instance for use as argument in filter.

@since  1.1.0

@author Eddilbert Macharia (http://eddmash.com) <edd.cowan@gmail.com>

@throws TypeError
Ready this instance for use as argument in filter .