Skip to content

Instantly share code, notes, and snippets.

@rileyrg
Created June 29, 2017 13:48
Show Gist options
  • Save rileyrg/d4fc0ecb53e39927223556774f0393d5 to your computer and use it in GitHub Desktop.
Save rileyrg/d4fc0ecb53e39927223556774f0393d5 to your computer and use it in GitHub Desktop.
SELECT a.country_code,a.city,a.street from person p
Join adress_data a
on p.adress_data_id = a.id
JOIN country c
on c.code=a.country_code where c.code="DE"
My Symfony version: (not working):
$queryBuilder = $this->createQueryBuilder("p")
->innerJoin("p.adressData", "a")
->innerJoin("a.country","c")
->where("c.code=:code")
->setParameter(':code', strtoupper($code));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment