Exemple #1
0
 /**
  * @return SelectQuery
  **/
 public function fillSelectQuery(SelectQuery $query)
 {
     $query->limit($this->limit, $this->offset);
     if ($this->distinct) {
         $query->distinct();
     }
     if ($this->logic->getSize()) {
         $query->andWhere($this->logic->toMapped($this->checkAndGetDao(), $query));
     }
     if ($this->order) {
         $query->setOrderChain($this->order->toMapped($this->checkAndGetDao(), $query));
     }
     if ($this->projection->isEmpty() && $this->strategy->getId() != FetchStrategy::CASCADE) {
         $this->joinProperties($query, $this->checkAndGetDao(), $this->checkAndGetDao()->getTable(), true);
     }
     return $query;
 }