public function addJoin($key, array $parameters, $joinType = null)
    {
        if ( ! is_null($joinType)) {

            if ($joinType == 'join' || stripos($joinType, 'inner') !== false) {
                $this->joinTypes[$key] = 'join';
            } elseif (stripos($joinType, 'right') !== false) {
                $this->joinTypes[$key] = 'rightJoin';
            } else {
                unset( $this->joinTypes[$key] );
            }
        }

        $this->joins[$key] = $parameters;

        return $this;
    }