1
0
mirror of synced 2025-02-20 14:13:15 +03:00

Fixed issue with count() and composite column primary keys

This commit is contained in:
Jonathan.Wage 2007-08-01 17:56:18 +00:00
parent 0e990f7594
commit 75a1ead588

View File

@ -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) {