cakephp/cakephp — pull request #3021 by wvdongen (2014-03-14 14:27:27+00:00)
Title: Fixed bug where select query in deleteAll could return wrong table name

Fixed bug where select query in deleteAll could return wrong table name.

PDOStatement::getColumnMeta (in mysql.php) sometimes returns the actual table name when using a MySQL view with the distinct select query, and not the alias table name. By returning the actual table name the records could not be removed.
By the way PDOStatement::getColumnMeta is an experimental function, perhaps it's better to avoid it.