Ticket #1329 (closed defect: fixed)

Opened 11 months ago

Last modified 10 months ago

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

Changed 11 months ago by hansbrix

  • description modified (diff)

Changed 11 months ago by guilhermeblanco

  • status changed from new to closed
  • resolution set to fixed

(In [4777]) fixed #1329. Added checking for 2 words operator (NOT IN for example) in JoinCondition?.php

Changed 10 months ago by anonymous

  • milestone New deleted

Milestone New deleted

Note: See TracTickets for help on using tickets.