protected function join(
        $type,
        $joinTableName,
        $key,
        $comparator,
        $value = null,
        $shouldCompareFields = true,
        $tableName = null
    ) {
        if (!$tableName) {
            $tableName = $this->getTableName();
        }

        $condition = new \Parable\ORM\Query\Condition();
        $condition
            ->setQuery($this)
            ->setTableName($tableName)
            ->setJoinTableName($joinTableName)
            ->setKey($key)
            ->setComparator($comparator)
            ->setValue($value)
            ->setShouldCompareFields($shouldCompareFields);

        $this->joins[$type][] = $condition;
        return $this;
    }
protected function join(
        $type,
        $joinTableName,
        $key,
        $comparator,
        $value = null,
        $shouldCompareFields = true,
        $tableName = null
    ) {
        if (!$tableName) {
            $tableName = $this->getTableName();
        }

        $condition = new \Parable\ORM\Query\Condition();
        $condition
            ->setQuery($this)
            ->setTableName($tableName)
            ->setJoinTableName($joinTableName)
            ->setKey($key)
            ->setComparator($comparator)
            ->setValue($value)
            ->setShouldCompareFields($shouldCompareFields);

        $this->joins[$type][] = $condition;
        return $this;
    }
protected function join ( $ type , $ joinTableName , $ key , $ comparator , $ value = null , $ shouldCompareFields = true , $ tableName = null ) { if ( ! $ tableName ) { $ tableName = $ this -> getTableName ( ) ; } $ condition = new \ Parable \ ORM \ Query \ Condition ( ) ; $ condition -> setQuery ( $ this ) -> setTableName ( $ tableName ) -> setJoinTableName ( $ joinTableName ) -> setKey ( $ key ) -> setComparator ( $ comparator ) -> setValue ( $ value ) -> setShouldCompareFields ( $ shouldCompareFields ) ; $ this -> joins [ $ type ] [ ] = $ condition ; return $ this ; }
Add a join to the query.

@param int         $type
@param string      $joinTableName
@param string      $key
@param string      $comparator
@param mixed       $value
@param bool        $shouldCompareFields
@param string|null $tableName

@return $this
Add a join to the query .