Typo3 , extbase mapped entity return no results -


first of all, create extension "extension builder". extend "tt_address" extension.

what steps do?

  1. i create entity adress , map existing table tt_address. in entity address create setter , getter retrieving addressinformations 'city, zip , street'.

  2. after step create repository addressrepository extends \typo3\cms\extbase\persistence\repository.

  3. the extensionbuilder create typoscript file ext_typoscript_setup.txt content:

    config.tx_extbase{ persistence{ classes{

            mab\oaaddress\domain\model\address {             mapping {                 tablename = tt_address                 recordtype = tx_oaaddress_address             }         }      } }} 
  4. i set storagepid in constants.txt

in last step retrieve addresses database , show in list view.

class addresscontroller extends \typo3\cms\extbase\mvc\controller\actioncontroller {      /**      * events repository      *      * @var \mab\oaaddress\domain\repository\addressrepository      * @inject      */     protected $addressrepository;      /**      * action list      *      * @return void      */     public function listaction() {         // exists adress repository?         //var_dump($this->addressrepository);         $addresses = $this->addressrepository->findall();         //var_dump(count($addresses));         $this->view->assign('addresses', $addresses);     } 

the table tt_address contains more ten results. controller show $addresses count 0. clear every cache (empty typo3temp folder, empty cache through install tool, emptyh backend cache) nothing have effect. why controller return nothing? can give me tip?

update

after analyse query log, find query executed:

select  tt_address.* tt_address  1=1 , (tt_address.tx_extbase_type='tx_oaaddress_address') , tt_address.pid in (148) , tt_address.deleted=0 , tt_address.hidden=0 

how can remove part

tt_address.tx_extbase_type='tx_oaaddress_address' part of query?


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -