Doctrine\ORM\QueryBuilder::leftJoin
Creates and adds a left join over an entity association to the query.
The entities in the joined association will be fetched as part of the query result if the alias used for the joined association is placed in the select expressions. <code> $qb = $em->createQueryBuilder() ->select('u') ->from('User', 'u') ->leftJoin('u.Phonenumbers', 'p', Expr\Join::WITH, 'p.is_primary = 1'); </code>
Signature
public function leftJoin(string
$join,
[string
$alias = null,
[string
$conditionType = null,
[string
$condition = null,
[string
$indexBy = null]]]] )
Parameters
$join
— string- The relationship to join
$alias
— string- The alias of the join
$conditionType
— string- The condition type constant. Either ON or WITH.
$condition
— string- The condition for the join
$indexBy
— string- The index for the join
Returns
- QueryBuilder
- This QueryBuilder instance.