Created
March 27, 2018 08:26
-
-
Save IvanAlekseevichPopov/a4f9630ff279e1a41400c5a45b3448d8 to your computer and use it in GitHub Desktop.
Doctrine query with unidirectional reverse side join
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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