zendframework/zf2 — pull request #5969 by feliperamaral (2014-03-13 22:16:32+00:00)
Title: Fix tablegateway query with selectWith alias

Fixed this error:

$tableGateway = new \Zend\Db\TableGateway\TableGateway('main_table', $adapter);
$select = new \Zend\Db\Sql\Select(array('MT' => 'main_table'));

// Joins...group...etc...

$result = $tableGateway->selectWith($select);//Exception thrown here...
//Msg: The table name of the provided select object must match that of the table