Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 24th, 2012  |  syntax: None  |  size: 0.48 KB  |  hits: 28  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Doctrine2: left join WITH not working
  2. $query = $this->getEntityManager()->createQuery("
  3.             SELECT a, MIN(l.price) as minPrice, MAX(l.price) as maxPrice
  4.                     FROM TechforgeApartmentBundle:ApFloor a
  5.                     LEFT JOIN a.leases l
  6.                     LEFT JOIN a.exemptions x WITH x.id = 3
  7.                     WHERE a.apartment = ?1
  8.                     GROUP BY a.id");
  9.        
  10. LEFT JOIN exemption_period e2_ ON a0_.id = e2_.ap_floor_id
  11. AND (
  12. 3 = e2_.id
  13. )