Skip to content

Instantly share code, notes, and snippets.

@IvanAlekseevichPopov
Created March 27, 2018 08:26
Show Gist options
  • Save IvanAlekseevichPopov/a4f9630ff279e1a41400c5a45b3448d8 to your computer and use it in GitHub Desktop.
Save IvanAlekseevichPopov/a4f9630ff279e1a41400c5a45b3448d8 to your computer and use it in GitHub Desktop.
Doctrine query with unidirectional reverse side join
use Doctrine\ORM\Query\Expr\Join;
//...
//Many Sources has one country
$qb = $this->createQueryBuilder('country');
return $qb
->join(Source::class, 'source', Join::WITH, 'source.country = country')
->getQuery()
->getResult();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment