Changeset 6859
- Timestamp:
- 12/04/09 19:12:51 (8 months ago)
- Location:
- branches/1.2
- Files:
-
- 2 modified
-
lib/Doctrine/Query/JoinCondition.php (modified) (1 diff)
-
tests/Ticket/1483TestCase.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/1.2/lib/Doctrine/Query/JoinCondition.php
r6528 r6859 123 123 $rightExpr = (($hasRightAggExpression) ? $rightMatches[1] . '(' : '') 124 124 . $value 125 . (($hasRightAggExpression) ? $rightMatches[3] . ')': '') ;125 . (($hasRightAggExpression) ? ')' . $rightMatches[3] : '') ; 126 126 127 127 $condition = $leftExpr . ' ' . $operator . ' ' . $rightExpr; -
branches/1.2/tests/Ticket/1483TestCase.php
r5901 r6859 59 59 60 60 } 61 62 public function testTest4() 63 { 64 $q = Doctrine_Query::create() 65 ->from('Ticket_1483_User u') 66 ->leftJoin('u.Groups g WITH g.id = (SELECT SUM(1, 2, 3) AS testing)'); 67 $this->assertEqual($q->getSqlQuery(), 'SELECT t.id AS t__id, t.username AS t__username, t2.id AS t2__id, t2.name AS t2__name FROM ticket_1483__user t LEFT JOIN ticket_1483__user_group t3 ON (t.id = t3.user_id) LEFT JOIN ticket_1483__group t2 ON t2.id = t3.group_id AND (t2.id = (SELECT SUM(1, 2, 3) AS testing))'); 68 69 } 61 70 } 62 71