function of(Row $foreign, $ref = null, $order = null, $limit = 0, $offset = 0) {
		// select * from $this where $this->$foreignColumn = $foreign->$referencedColumn
		
		if (!($rel = $this->getRelation($foreign->getTable()->getName(), $ref))) {
			return $this->onResult(null);
		}
		
		$where = array();
		foreach ($rel as $key => $ref) {
			$where["$key="] = $foreign->$ref;
		}
		
		return $this->find($where, $order, $limit, $offset);
	}
function of(Row $foreign, $ref = null, $order = null, $limit = 0, $offset = 0) {
		// select * from $this where $this->$foreignColumn = $foreign->$referencedColumn
		
		if (!($rel = $this->getRelation($foreign->getTable()->getName(), $ref))) {
			return $this->onResult(null);
		}
		
		$where = array();
		foreach ($rel as $key => $ref) {
			$where["$key="] = $foreign->$ref;
		}
		
		return $this->find($where, $order, $limit, $offset);
	}
function of ( Row $ foreign , $ ref = null , $ order = null , $ limit = 0 , $ offset = 0 ) { // select * from $this where $this->$foreignColumn = $foreign->$referencedColumn if ( ! ( $ rel = $ this -> getRelation ( $ foreign -> getTable ( ) -> getName ( ) , $ ref ) ) ) { return $ this -> onResult ( null ) ; } $ where = array ( ) ; foreach ( $ rel as $ key => $ ref ) { $ where [ "$key=" ] = $ foreign -> $ ref ; } return $ this -> find ( $ where , $ order , $ limit , $ offset ) ; }
Get the child rows of a row by foreign key
@param \pq\Gateway\Row $foreign
@param string $ref optional fkey name
@param string $order
@param int $limit
@param int $offset
@return mixed
Get the child rows of a row by foreign key