ZF-3152: Problem with joinUsing and Oracle

Issue Type: Bug Created: 2008-04-20T09:09:01.000+0000 Last Updated: 2008-10-10T14:41:46.000+0000 Status: Resolved Fix version(s): - 1.6.2 (13/Oct/08)

Reporter: Mickael Perraud (mikaelkael) Assignee: Mickael Perraud (mikaelkael) Tags: - Zend_Db_Select

Related issues: - ZF-3587

Attachments: - zf3152.patch


In the function _joinUsing of Zend_Db_Select:

<pre class="highlight">
public function _joinUsing($type, $name, $cond, $cols = '*', $schema = null)
    if (empty($this->_parts[self::FROM])) {
        require_once 'Zend/Db/Select/Exception.php';
        throw new Zend_Db_Select_Exception("You can only perform a joinUsing after specifying a FROM table");

    $join  = $this->_adapter->quoteIdentifier(key($this->_parts[self::FROM]));
    $from  = $this->_adapter->quoteIdentifier($this->_uniqueCorrelation($name));

    $cond1 = $from . '.' . $cond;
    $cond2 = $join . '.' . $cond;
    $cond  = $cond1 . ' = ' . $cond2;

    return $this->_join($type, $name, $cond, $cols, $schema);

There is a call to quoteIdentifier, to function with Oracle, we must call with second parameter:

<pre class="highlight">
$join  = $this->_adapter->quoteIdentifier(key($this->_parts[self::FROM]), true);
$from  = $this->_adapter->quoteIdentifier($this->_uniqueCorrelation($name), true);


Posted by Mickael Perraud (mikaelkael) on 2008-04-25T12:46:53.000+0000


Posted by Wil Sinclair (wil) on 2008-06-09T12:37:14.000+0000

Please evaluate and fix/categorize as necessary.

Posted by Mickael Perraud (mikaelkael) on 2008-10-01T14:45:08.000+0000

Fixed in SVN11572

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.