-
Notifications
You must be signed in to change notification settings - Fork 42
Open
Description
To join entity which does not have relation with master entity.
In QueryBuilder:
$qb->join(SomeEntity::class, 'se', Join::WITH, 'e.id = se.id');
Spec.php
public static function join($field, $newAlias, $dqlAlias = null, $conditionType = null, $condition = null)
{
return new Join($field, $newAlias, $dqlAlias, $conditionType, $condition);
}
AbstractJoin.php
public function modify(QueryBuilder $qb, $dqlAlias)
{
if (null !== $this->dqlAlias) {
$dqlAlias = $this->dqlAlias;
}
$join = $this->getJoinType();
$field = null !== $conditionType ? $this->field : sprintf('%s.%s', $dqlAlias, $this->field);
$qb->$join($field, $this->newAlias, $conditionType, $condition);
}