Exemplo n.º 1
0
 /**
  * @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);
 }
Exemplo n.º 2
0
 /**
  * @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);
 }