2017-03-17 84 views
0

我只需要得到與類型= 0,但查詢後的記錄,我得到了所有與所有類型的記錄TYPO3 extbase等於不工作

public function findPeople() { 
     $query = $this->peopleRepository->createQuery(); 
     $query->equals('type', 0); 
     $query->setOrderings(
      array(
       'uid' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_DESCENDING 
      ) 
     ); 
     return $query->execute(); 
    } 


    /** 
    * action people 
    * 
    * @return void 
    */ 
    public function listAction() 
    { 
     $people = $this->findPeople(); 
     $this->view->assign('people', $people); 
    } 
+0

側面注意:'findPeople'方法應該是'PeopleRepository'類中,而不是在控制器類... –

回答