Ticket #1329 (closed defect: fixed)
NOT IN broken in DQL WITH clause
| Reported by: | hansbrix | Owned by: | romanb |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | Query/Hydration | Version: | 0.11.0 |
| Severity: | Keywords: | dql | |
| Cc: | Has Test: | no | |
| Status: | Pending Core Response | Has Patch: | no |
Description (last modified by hansbrix) (diff)
3 line example below. the DQL shows the not in statement correctly, but in sql it's stripped out (presumably due to some parsing error with not in being 2 words...). the same query without the NOT generates the expected SQL.
$q = Doctrine_Query::create()->select('p.base')->from('ProductBase p');
$q->innerJoin('p.Metabase m WITH m.id NOT IN (1, 2, 4)');
echo $q->getDql(), '<hr>', $q->getSql();
output:
SELECT p.base FROM ProductBase p INNER JOIN p.Metabase m WITH m.id NOT IN (1, 2, 4) ---- SELECT p.base AS p__base FROM productbase p INNER JOIN metabase m ON p.metabase_id = m.id AND m.id NOT IN
Change History
Note: See
TracTickets for help on using
tickets.