Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.1.6, 1.2.1
-
Fix Version/s: None
-
Component/s: Query
-
Labels:None
Description
Continuing with same setup as in http://www.doctrine-project.org/jira/browse/DC-417
I discovered another issue
$result = Doctrine_Query::create()
->select('u.*, m.*, COUNT(m.id) > 0 AS match_check')
->from('User u')
->leftJoin('u.Matches m')
->groupBy('u.id')
->orderBy('match_check DESC, RAND()')
->execute(array(), Doctrine::HYDRATE_ARRAY);
match_check will actually be count of matches not 0 or 1 as i expected.
is it bug or feature?