Commit 75a1ead5 authored by Jonathan.Wage's avatar Jonathan.Wage

Fixed issue with count() and composite column primary keys

parent 0e990f75
......@@ -1378,7 +1378,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable
// build the query base
$q = 'SELECT COUNT(DISTINCT ' . $this->getTableAlias($componentAlias)
. '.' . $table->getIdentifier()
. '.' . implode(',', (array) $table->getIdentifier())
. ') AS num_results';
foreach ($this->parts['select'] as $field) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment