/** * @param AbstractWhere $query * @param string $parent */ public function join(AbstractWhere $query, $parent) { $alias = $this->getName(); $conditions = ["{$alias}.{$this->getForeignKey()}" => "{$parent}.{$this->getKey()}", "{$alias}.{$this->getForeignClassKey()}" => new SQL('= ?', [$this->getConfig()->getModelClass()])]; $conditions += $this->getSoftDeleteConditions(); $query->joinAliased($this->getRepo()->getTable(), $alias, $conditions); }
/** * @param AbstractWhere $query * @param string $parent */ public function join(AbstractWhere $query, $parent) { $conditions = ["{$this->getName()}.{$this->getForeignKey()}" => "{$parent}.{$this->getKey()}"]; $conditions += $this->getSoftDeleteConditions(); $query->joinAliased($this->getRepo()->getTable(), $this->getName(), $conditions); }