Skip to content

Instantly share code, notes, and snippets.

@IvanAlekseevichPopov
Created June 18, 2018 13:33
Show Gist options
  • Save IvanAlekseevichPopov/345827032c403bf7ae098d0e1ae10633 to your computer and use it in GitHub Desktop.
Save IvanAlekseevichPopov/345827032c403bf7ae098d0e1ae10633 to your computer and use it in GitHub Desktop.
doctrine join with on other side of unidirectional relation
<?php
$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