lib/db/cortex.php
protected function _refSubQuery($key, $filter, $options,$fields=null) {
		$type = $this->fieldConf[$key]['relType'];
		$fieldConf = $this->fieldConf[$key][$type];
		$rel = $this->getRelFromConf($fieldConf,$key);
		$filter[0]=$this->queryParser->sql_quoteCondition($filter[0],$this->db);
		return $rel->mapper->stringify(implode(',',array_map([$this->db,'quotekey'],
			$fields?:[$rel->primary])),$filter,$options);
	}
protected function _refSubQuery($key, $filter, $options,$fields=null) {
		$type = $this->fieldConf[$key]['relType'];
		$fieldConf = $this->fieldConf[$key][$type];
		$rel = $this->getRelFromConf($fieldConf,$key);
		$filter[0]=$this->queryParser->sql_quoteCondition($filter[0],$this->db);
		return $rel->mapper->stringify(implode(',',array_map([$this->db,'quotekey'],
			$fields?:[$rel->primary])),$filter,$options);
	}
protected function _refSubQuery ( $ key , $ filter , $ options , $ fields = null ) { $ type = $ this -> fieldConf [ $ key ] [ 'relType' ] ; $ fieldConf = $ this -> fieldConf [ $ key ] [ $ type ] ; $ rel = $ this -> getRelFromConf ( $ fieldConf , $ key ) ; $ filter [ 0 ] = $ this -> queryParser -> sql_quoteCondition ( $ filter [ 0 ] , $ this -> db ) ; return $ rel -> mapper -> stringify ( implode ( ',' , array_map ( [ $ this -> db , 'quotekey' ] , $ fields ? : [ $ rel -> primary ] ) ) , $ filter , $ options ) ; }
build sub query on relation
@param $key
@param $filter
@param $options
@return mixed
build sub query on relation