コード例 #1
0
ファイル: EntityCollection.php プロジェクト: matak/dbrecord
 /**
  * Create new query based on repository.
  *
  * @param string $conditions
  * @return EntityCollection
  */
 public function query($conditions = NULL)
 {
     $query = $this->repository->query($conditions);
     // po vytvoreni noveho query je nutne kolekci vyprazdnit, prvky v kolekci obsazene by neodpovidali novemu query
     $this->clear();
     // je mozne opet loadovat
     $this->setLoadable(true);
     return $query;
 }