2017-03-17 66 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'类中,而不是在控制器类... –

回答